Color coordinate systems and image editing

ABSTRACT

Color is edited using a color representation including digital values B (brightness), e and f such that B=√{square root over (D 2 +E 2 +F 2 )}, e=E/B, f=F/B, where DEF is a linear color coordinate system. Alternatively, color is represented using digital values B, C (chroma) and H (hue), where cos C=D/B and tan H=E/F. Brightness can be changed without a color shift by changing the B coordinate and leaving unchanged the other coordinates e and f or C and H. Other image editing techniques and other features are also provided.

CROSS REFERENCE TO RELATED APPLICATIONS

The present application is a continuation-in-part of each of the following US patent applications, which are incorporated herein by reference:

1. Ser. No. 11/321,443, filed Dec. 28, 2005 by Sergey N. Bezryadin;

2. Ser. No. 11/322,111, filed Dec. 28, 2005 by Sergey N. Bezryadin;

3. Ser. No. 11/377,161, filed Mar. 16, 2006 by Sergey N. Bezryadin, which is a continuation-in-part of U.S. patent application Ser. No. 11/321,443, filed Dec. 28, 2005 by Sergey N. Bezryadin;

4. Ser. No. 11/376,837, filed Mar. 16, 2006 by Sergey N. Bezryadin, which is a continuation of U.S. patent application Ser. No. 11/321,443, filed Dec. 28, 2005 by Sergey N. Bezryadin, and which is also a continuation of U.S. patent application Ser. No. 11/322,111, filed Dec. 28, 2005 by Sergey N. Bezryadin;

5. Ser. No. 11/377,591, filed Mar. 16, 2006 by Sergey N. Bezryadin, which is a continuation of U.S. patent application Ser. No. 11/321,443, filed Dec. 28, 2005 by Sergey N. Bezryadin, and which is also a continuation of U.S. patent application Ser. No. 11/322,111, filed Dec. 28, 2005 by Sergey N. Bezryadin;

6. Ser. No. 11/494,393, filed Jul. 26, 2006 by Sergey N. Bezryadin, which is a continuation-in-part of U.S. patent application Ser. No. 11/377,161, filed Mar. 16, 2006 by Sergey N. Bezryadin, which is (i) a continuation-in-part of U.S. patent application Ser. No. 11/321,443, filed Dec. 28, 2005 by Sergey N. Bezryadin, and (ii) which is a continuation-in-part of U.S. patent application Ser. No. 11/322,111, filed Dec. 28, 2005 by Sergey N. Bezryadin;

7. Ser. No. 11/432,221, filed May 10, 2006 by Sergey N. Bezryadin, which is a continuation-in-part of U.S. patent application Ser. No. 11/321,443, filed Dec. 28, 2005 by Sergey N. Bezryadin, and which is also a continuation-in-part of U.S. patent application Ser. No. 11/322,111, filed Dec. 28, 2005 by Sergey N. Bezryadin.

The present application incorporates by reference PCT application no. PCT/US2006/062421, filed 20 Dec. 2006.

BACKGROUND OF THE INVENTION

The present invention relates to digital representation, processing, storage and transmission of images, including editing of polychromatic and monochromatic color images. A digital representation of an image can be stored in a storage device (e.g. a computer memory, a digital video recorder, or some other device). Such representation can be transmitted over a network, and can be used to display the image on a computer monitor, a television screen, a printer, or some other device. The image can be edited using a suitable computer program.

Color is a sensation caused by electromagnetic radiation (light) entering a human eye. The light causing the color sensation is called “color stimulus”. Color depends on the radiant power and spectral composition of the color stimulus, but different stimuli can cause the same color sensation. Therefore, a large number of colors can be reproduced (“matched”) by mixing just three “primary” color stimuli, e.g. a Red, a Blue and a Green. The primary stimuli can be produced by three “primary” light beams which, when mixed and reflected from an ideal diffuse surface, produce a desired color. The color can be represented by its coordinates, which specify the intensities of the primary light beams. For example, in linear RGB color coordinate systems, a color S is represented by coordinates R, G, B which define the intensities of the respective Red, Green and Blue primary light beams needed to match the color S. If P(λ) is the radiance (i.e. the energy per unit of time per unit wavelength) of a light source generating the color S, then the RGB coordinates can be computed as:

R=∫ ₀ ^(∞) P(λ) r (λ)dλ

G=∫ ₀ ^(∞) P(λ) g (λ)dλ

B=∫ ₀ ^(∞) P(λ) b (λ)dλ  (1)

where r(λ), g(λ), b(λ) are “color matching functions” (CMF's). For each fixed wavelength λ, the values r(λ), g(λ), b(λ) are respectively the R, G and B values needed to match color produced by a monochromatic light of the wavelength λ of a unit radiance. The color matching functions are zero outside of the visible range of the λ values, so the integration limits in (1) can be replaced with the limits of the visible range. The integrals in (1) can be replaced with sums if the radiance P(λ) is specified as power at discrete wavelengths. FIG. 1 illustrates the color matching functions for the 1931 CIE RGB color coordinate system for a 2° field. (CIE stands for “Commission Internationale de l'Eclairage”.) See D. Malacara, “Color Vision and Colorimetry: theory and applications” (2002), and Wyszecki & Stiles, “Color Science: concepts and Methods, Quantitative Data and Formulae” (2^(nd) Ed. 2000), both incorporated herein by reference.

The RGB system of FIG. 1 is called linear because, as shown by equations (1), the R, G, and B values are linear in P(λ). In a linear system, the intensities such as R, G, B are called “tristimulus values”.

As seen from FIG. 1, the function r(λ) can be negative, so the R coordinate can be negative. If R is negative, this means that when the color S is mixed with |R| units of the Red primary, the resulting color matches the mixture of G units of the Green primary with B units of the Blue primary.

New linear color coordinate systems can be obtained as non-degenerate linear transformations of other systems. For example, the 1931 CIE XYZ color coordinate system for a 2° field is obtained from the CIE RGB system of FIG. 1 using the following transformation:

$\begin{matrix} {{\begin{bmatrix} X \\ Y \\ Z \end{bmatrix} = {A_{{RGB} - {XYZ}}\begin{bmatrix} R \\ G \\ B \end{bmatrix}}}{{where}\text{:}}} & (2) \\ {A_{{RGB} - {XYZ}} = {\frac{1}{0.17697}\begin{bmatrix} 0.49 & 0.31 & 0.20 \\ 0.17697 & 0.81240 & 0.01063 \\ 0.00 & 0.01 & 0.99 \end{bmatrix}}} & (3) \end{matrix}$

This XYZ system does not correspond to real, physical primaries. The color matching functions x(λ), y(λ), z(λ) for this XYZ system are shown in FIG. 2. These color matching functions are defined by the same matrix A_(RGB-XYZ):

$\begin{bmatrix} {\overset{\_}{x}(\lambda)} \\ {\overset{\_}{y}(\lambda)} \\ {\overset{\_}{z}(\lambda)} \end{bmatrix} = {A_{{RGB} - {XYZ}}\begin{bmatrix} {\overset{\_}{r}(\lambda)} \\ {\overset{\_}{g}(\lambda)} \\ {\overset{\_}{b}(\lambda)} \end{bmatrix}}$

The tristimulus values X, Y, Z can be computed from the color matching functions in the usual way:

X=∫ ₀ ^(∞) P(λ) x (λ)dλ

Y=∫ ₀ ^(∞) P(λ) y (λ)dλ

Z=∫ ₀ ^(∞) P(λ) z (λ)dλ  (4)

There are also non-linear color coordinate systems. One example is a non-linear sRGB system standardized by International Electrotechnical Commission (IEC) as IEC 61966-2-1. The sRGB coordinates can be converted to the XYZ coordinates (4) or the CIE RGB coordinates (1). Another example is HSB (Hue, Saturation, Brightness). The HSB system is based on sRGB. In the HSB system, the colors can be visualized as points of a vertical cylinder. The Hue coordinate is an angle on the cylinder's horizontal circular cross section. The pure Red color corresponds to Hue=0°; the pure Green to Hue=120°; the pure Blue to Hue=240°. The angles between 0° and 120° correspond to mixtures of the Red and the Green; the angles between 120° and 240° correspond to mixtures of the Green and the Blue; the angles between 240° and 360° correspond to mixtures of the Red and the Blue. The radial distance from the center indicates the color's Saturation, i.e. the amount of White (White means here that R=G=B). At the circumference, the Saturation is maximal, which means that the White amount is 0 (this means that at least one of the R, G, and B coordinates is 0). At the center, the Saturation is 0 because the center represents the White color (R=G=B). The Brightness is measured along the vertical axis of the cylinder, and is defined as max(R,G,B).

Different color coordinate systems are suitable for different purposes. For example, the sRGB system is convenient for rendering color on certain types of monitors which recognize the sRGB coordinates and automatically convert these coordinates into color. The HSB system is convenient for some color editing operations including brightness adjustments.

Brightness can be thought of as a degree of intensity of a color stimulus. Brightness corresponds to our sensation of an object being “bright” or “dim”. Brightness has been represented as the Y value of the XYZ system of FIG. 2, or as the maximum of the R, G and B coordinates of the sRGB coordinate system. Other representations also exist. Hue is the attribute of a color perception denoted by blue, green yellow, red, purple, and so on. See the Wyszecki & Styles book cited above, page 487. Saturation can be thought of as a measure of the white amount in the color.

Contrast can be thought of as the brightness difference between the brightest and the dimmest portions of the image or part of the image.

Exemplary contrast editing techniques are described in William K. Pratt, “DIGITAL IMAGE PROCESSING” (3ed. 2001), pages 243-252, incorporated herein by reference.

Sharpness relates to object boundary definition. The image is sharp if the object boundaries are well defined. The image is blurry if it is not sharp.

It is desirable to obtain color coordinate systems which facilitate brightness editing and other types of image editing. For example, it may be desirable to highlight an image area, i.e. to increase its brightness, without making large changes to other image areas. Conversely, it may be desirable to shadow (i.e. to dim) a selected image area without making large changes in other image areas. It is also desirable to obtain color coordinate systems which facilitate transforming a polychromatic image into a monochromatic image (for example, in order to display a polychromatic image using a monochromatic printer or monitor, or to achieve a desired visual effect). It may also be desirable to change the hue or saturation, for example to change the hue of a monochromatic image.

SUMMARY

This section summarizes some features of the invention. The invention is not limited to these features. The invention is defined by the appended claims, which are incorporated into this section by reference.

Some embodiments of the present invention provide novel color coordinate systems and novel image editing techniques suitable for novel and/or conventional color coordinate systems.

In some embodiments of the present invention, the contrast is edited as follows. Let us suppose that a digital image consist of a number of pixels. Let us enumerate these pixels as p₁, p₂, . . . . (The invention is not limited to any pixel enumeration.) Let B(p_(i)) denote the brightness at the pixel p_(i) (i=1, 2 . . . ). The contrast editing can be performed by changing the brightness B(p_(i)) to the value

B^(*)(p_(i)) = B_(avg)^(1 − ɛ)(p_(i)) × B^(ɛ)(p_(i))

where ε is a positive constant other than 1, and B_(avg) is a weighted average (e.g. the mean) of the brightness values B in an image region R(p_(i)) containing the pixel p_(i). Of note, this equation means that:

${\frac{B^{*}\left( p_{i} \right)}{B_{avg}\left( p_{i} \right)} = \left( \frac{B\left( p_{i} \right)}{B_{avg}\left( p_{i} \right)} \right)^{ɛ}},{{{or}\mspace{14mu} {B^{*}\left( p_{i} \right)}} = {{B_{avg}\left( p_{i} \right)} \times \left( \frac{B\left( p_{i} \right)}{B_{avg}\left( p_{i} \right)} \right)^{ɛ}}}$

The invention is not limited to such embodiments. For example, the brightness can be edited according to the equation:

${B^{*}\left( p_{i} \right)} = {{B_{avg}\left( p_{i} \right)} \times {f\left( \frac{B\left( p_{i} \right)}{B_{avg}\left( p_{i} \right)} \right)}}$

where f is a predefined strictly increasing non-identity function, and B_(avg)(p_(i)) is a function of the B values of image portions in an image region R(p_(i)) containing the portion p_(i).

Some embodiments use a color coordinate system in which the brightness B is one of the coordinates. In some embodiments, the brightness B can be changed without changing the chromaticity coordinates. For a linear color coordinate system with coordinates T₁, T₂, T₃, the chromaticity coordinates are defined as:

T₁/(T₁+T₂+T₃), T₂/(T₁+T₂+T₃), T₃/(T₁+T₂+T₃).

In some embodiments, a non-linear color coordinate system is used in which the brightness B is defined by a square root of a quadratic polynomial in tristimulus values, e.g. by a value B=√{square root over (T₁ ²+T₂ ²+T₃ ²)} where T₁, T₂, T₃ are tristimulus values. In some embodiments, B may or may not be one of the coordinates, but one of the coordinates is defined by B alone or in combination with the sign of one or more of T₁, T₂, T₃.

In some embodiments, the color coordinate system has the following coordinates:

B=√{square root over (T ₁ ² +T ₂ ² +T ₃ ²)}

S ₂ =T ₂ /B

S ₃ =T ₃ /B

In this coordinate system, if the B coordinate is changed, e.g. multiplied by some number k, and S₂ and S₃ are unchanged, the color modification corresponds to multiplying the tristimulus values by k. Such color modification does not change the chromaticity coordinates

T₁(T₁+T₂+T₃) T₂/(T₁+T₂+T₃),T₃/(T₁+T₂+T₃).

Therefore, the (B, S₂, S₃) coordinate system facilitates color editing when it is desired not to change the chromaticity coordinates (so that no color shift would occur). Of note, there is a known color coordinate system xyY which also allows changing only one coordinate Y without changing the chromaticity coordinates. The xyY system is defined from the XYZ coordinates of FIG. 2 as follows:

the Y coordinate of the xyY system is the same as the Y coordinate of the XYZ system;

x=X/(X+Y+Z);

z=Z/(X+Y+Z).

In the xyY system, if Y is changed but x and y remain unchanged, then the chromaticity coordinates are unchanged. The xyY system differs from the (B, S₂, S₃) system in that the Y coordinate is a linear coordinate and is a tristimulus value, while the B coordinate is a non-linear function of tristimulus values (and of the power distribution P(λ)).

Linear transformations of such color coordinate systems can be used to obtain other novel color coordinate systems.

The techniques described above can be used to adjust either the global contrast, i.e. when the region R(p_(i)) is the whole image, or the local contrast, when the region R(p_(i)) is only a part of the image. In some embodiments, the region R(p_(i)) contains 10% to 30% of the image in the local contrast adjustments, and other percentages are possible.

The inventor has observed that the same techniques can be used to change the image sharpness if the region R(p_(i)) is small, e.g. 1% of the image or less. In some embodiments, the region R(p_(i)) is contained in a rectangle of at most 31 pixels by 31 pixels, with the center at pixel p_(i). Even smaller outer rectangles can be used, e.g. 21×21 pixels, or 11×11 pixels, and other rectangles. The image may contain thousands, millions, or some other number of pixels.

Also, the inventor has observed that it is sometimes desirable to change the global dynamic range of an image without making large changes to the local dynamic range. A dynamic range is the ratio of the maximum brightness B_(max) to the minimum brightness B_(min). (The brightness can be defined in a number of ways some of which are discussed above and below.) For the global dynamic range, the maximum and minimum brightness values are computed over the whole image (or a large portion of the image). For a local dynamic range, the maximum and minimum brightness values are computed over a small area. Below, “dynamic range” of an image is presumed global unless stated to the contrary. Suppose, for example, that an image has a (global) dynamic range DR=3000 (i.e. B_(max)/B_(min)=3000), and the image must be displayed on a monitor capable of a maximum dynamic range of only 300. This could be achieved simply by dividing the brightness B(p_(i)) at each pixel p_(i) by 10. However, some portions of the image may be adequately displayable without any change to their brightness, and dividing the brightness by 10 at these portions may result in image deterioration. For example, suppose that the brighter image portions can be displayed on the monitor without any brightness change, while the dimmer portions are outside of the monitor's range. Dividing the brightness by 10 would not improve the display of the dimmer portions. This could also cause deterioration of the brighter portions. It may be desirable to brighten (highlight) the dimmer portions without making large changes to the brighter portions so that the global dynamic range DR* (after editing) would become 300. The dynamic range of small image areas (“local dynamic range”) should preferably undergo little modification.

In some embodiments, the image editing is performed by changing the brightness value B(p_(i)) at each pixel p_(i) to a value B*(p_(i)) such that:

B*(p _(i))=f(B(p _(i)),B_(avg)(p _(i)))  (4A)

where B_(avg)(p_(i)) is some average brightness value (e.g. the mean brightness) in an image region R(p_(i)) containing the pixel p_(i), and f is a predefined function such that for all i, the function f(B(p_(i)),y) is strictly monotonic in y for each B(p_(i)), and for each B_(avg)(p_(i)), the function f(x,B_(avg)(p_(i))) is strictly increasing in x. For example, in some embodiments,

B*(p _(i))=B(p _(i))×(B ₀ /B _(avg)(p_(i)))^(ε)  (4B)

where B₀ and ε are some constants.

Consider again the example above, with dimmer areas outside of the monitor's range. It is desirable to “highlight” the dimmer image areas to increase their brightness so that the global dynamic range would become 300, but the brightness of the bright image areas should not change much. In some embodiments, this is accomplished via the image editing according to (4B). The value B₀ is set to the maximum brightness value B_(max) over the initial image, and ε is set to a positive value, e.g. ½. When the average brightness B_(avg)(p_(i)) is close to the maximum brightness B₀, the brightness does not change much (percentage-wise), i.e. B*(p_(i))/B(p_(i)) is close to 1. Therefore, the brighter image areas are almost unchanged. When the value B_(avg)(p_(i)) is well below the maximum B₀ (i.e. in the dimmer areas), the coefficient (B₀/B_(avg)(p_(i)))^(ε) is large, so the image is significantly brightened (highlighted) in these areas. In some embodiments, the local dynamic range is almost unchanged. Indeed, for two pixels p_(i) and p_(j), the equation (4B) provides:

B*(p _(i))/B*(p _(j))=[B(p _(i))/B(p _(j))]×(B _(avg)(p _(j))/B _(avg)(p _(i)))^(ε)  (4C)

If p_(i) and p_(j) are near each other, than B_(avg)(p_(i)) and B_(avg)(p_(j)) are likely to be close to each other. Hence, the coefficient (B_(avg)(p_(j))/B_(avg)(p_(i)))^(ε) is small, so the maximum of the values B(p_(i))/B(p_(j)) over a small area will not change much. (The local dynamic range depends of course on how the “small area” is defined. In some embodiments, the area is defined so that the average brightness B_(avg) does not change much in the area, but other definitions are also possible. The invention is not limited to embodiments with small changes of the local dynamic range.)

If it is desirable to reduce the brightness of the brighter areas while leaving the dimmer areas unchanged or almost unchanged, one can select B₀ to be the minimum brightness. To reduce the brightness of the dimmer areas while leaving the brighter areas almost unchanged, one can select B₀ to be the maximum brightness and ε to be negative. Other options are also possible. In many embodiments, the global dynamic range is increased if ε is positive, and the global dynamic range is decreased if ε is negative. Of note, when ε is negative, equation (4B) can be written as:

B*(p _(i))=B(p _(i))×(B _(avg)(p _(i))/B ₀)^(|ε|)  (4D)

where |ε| is the absolute value of e.

Color editing (4B)-(4D) can be combined with other types of editing performed in separate steps or simultaneously. For example, highlighting of an image area can be combined with brightening the whole image (multiplying the brightness by a constant k>1) via the following transformation:

B*(p _(i))=k×B(p _(i))×(B ₀ B _(avg)(p _(i)))^(ε)  (4E)

To convert a color image to a monochromatic image (i.e. a polychromatic image to a monochromatic image) in the coordinate system (B,S₂,S₃), or to change the color (e.g. the hue) of a monochromatic image, the coordinates S₂ and S₃ can be set to a predefined value representing the desired color (e.g. white for a black-and-white monochromatic image), and the value B can be left unchanged for each pixel. As a result, the brightness will be unchanged. Alternatively, the B coordinate can be processed to change the image brightness or contrast or achieve some other brightness-related effect.

Another embodiment uses a color coordinate system BCH in which the B coordinate is defined as above (e.g. by the value B=√{square root over (T₁ ²+T₂ ²+T₃ ²)}, or the value B and the sign of one or more of T₁, T₂, T₃). The other coordinates C and H are such that:

cos C=T ₁ /B

tan H=T ₃ /T ₂

In some embodiments, B represents the brightness, C represents the chroma (saturation), and H represents the hue. A color-to-monochromatic image conversion, or changing the color of a monochromatic image, can be achieved by setting C and H to predefined values representing the desired color. The B coordinate can be unchanged, or can be changed as needed for brightness-related processing.

Linear transformations of such color coordinate systems can be used to obtain other color coordinate systems with easy polychromatic to monochromatic conversion.

The invention is not limited to the features and advantages described above. The invention is not limited to editing an image to fit it into a dynamic range of a monitor, a printer, or some other display device. For example, the image editing may be performed to improve the image quality or for any other artistic, esthetic, or other purposes. Other features are described below. The invention is defined by the appended claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIGS. 1 and 2 are graphs of color matching functions for prior art color coordinate systems.

FIG. 3 illustrates some color coordinate systems according to some embodiments of the present invention.

FIGS. 4 and 5 are block diagrams illustrating color editing according to some embodiments of the present invention.

FIG. 6 illustrates an image edited according to some embodiments of the present invention.

FIG. 7 illustrates an image extension at the image boundaries for image editing according to some embodiments of the present invention.

FIGS. 8, 9 are brightness graphs illustrating contrast editing according to some embodiments of the present invention.

FIG. 10 is a flowchart of an image editing method according to some embodiments of the present invention.

FIG. 11 is a block diagram illustrating color editing according to some embodiments of the present invention.

FIGS. 12-14 are brightness graphs illustrating image editing according to some embodiments of the present invention.

FIGS. 15, 16 illustrate image values transformed via image editing according to some embodiments of the present invention.

FIGS. 17 and 18 are block diagrams illustrating color editing according to some embodiments of the present invention.

DESCRIPTION OF SOME EMBODIMENTS

The embodiments described in this section illustrate but do not limit the invention. The invention is defined by the appended claims.

Some embodiments of the present invention use color coordinate systems Bef and BCH which can be defined, for example, as follows. First, a linear color coordinate system DEF is defined as a linear transformation of the 1931 CIE XYZ color coordinate system of FIG. 2:

$\begin{matrix} {{\begin{bmatrix} D \\ E \\ F \end{bmatrix} = {A_{{XYZ} - {DEF}}\begin{bmatrix} X \\ Y \\ Z \end{bmatrix}}}{{where}\text{:}}} & (5) \\ {A_{{XYZ} - {DEF}} = \begin{bmatrix} 0.205306 & 0.712507 & 0.467031 \\ 1.853667 & {- 1.279659} & {- 0.442859} \\ {- 0.365451} & 1.011998 & {- 0.610425} \end{bmatrix}} & (6) \end{matrix}$

It has been found that for many computations, adequate results are achieved if the elements of matrix A_(XYZ-DEF) are rounded to four digits or fewer after the decimal point, i.e. the matrix elements can be computed with an error Err≦0.00005. Larger errors can also be tolerated in some embodiments. The DEF coordinate system corresponds to color matching functions d(λ), ē(λ), f(A) which can be obtained from x(λ), y(λ), z(λ) using the same matrix A_(XYZ-DEF):

$\begin{matrix} {\begin{bmatrix} {\overset{\_}{d}(\lambda)} \\ {\overset{\_}{e}(\lambda)} \\ {\overset{\_}{f}(\lambda)} \end{bmatrix} = {A_{{XYZ} - {DEF}}\begin{bmatrix} {\overset{\_}{x}(\lambda)} \\ {\overset{\_}{y}(\lambda)} \\ {\overset{\_}{z}(\lambda)} \end{bmatrix}}} & (7) \end{matrix}$

By definition of the color matching functions and the tristimulus values,

D=∫ ₀ ^(∞) P(λ) d (λ)dλ

E=∫ ₀ ^(∞) P(λ)ē(λ)dλ

F=∫ ₀ ^(∞) P(λ) f (λ)dλ  (8)

As explained above, the integration can be performed over the visible range only.

As seen in FIG. 2, the color matching functions x(λ), y(λ), z(λ) are never negative. It follows from equations (4) that the X, Y, Z values are never negative. Since the first row of matrix A_(XYZ-DEF) has only positive coefficients, the function d(λ) is never negative, and the D value is also never negative.

When D>0 and E=F=0, the color is white or a shade of gray. Such colors coincide, up to a constant multiple, with the CIE D₆₅ white color standard.

If a color is produced by a monochromatic radiation with λ=700 nm (this is a red color), then F=0 and E>0.

The color matching functions d(λ), ē(λ), f(λ) form an orthonormal system in the function space L₂ on [0,∞) (or on any interval containing the visible range of the λ values if the color matching functions are zero outside of this range), that is:

$\begin{matrix} {{{\int_{0}^{\infty}{{\overset{\_}{d}(\lambda)}\ {\overset{\_}{e}(\lambda)}{\lambda}}} = {{\int_{0}^{\infty}{{\overset{\_}{d}(\lambda)}\ {\overset{\_}{f}(\lambda)}{\lambda}}} = {{\int_{0}^{\infty}{{\overset{\_}{e}(\lambda)}\ {\overset{\_}{f}(\lambda)}{\lambda}}} = 0}}}{{\int_{0}^{\infty}{\left\lbrack {\overset{\_}{d}(\lambda)} \right\rbrack^{2}\ {\lambda}}} = {{\int_{0}^{\infty}{\left\lbrack {\overset{\_}{e}(\lambda)} \right\rbrack^{2}\ {\lambda}}} = {{\int_{0}^{\infty}{\left\lbrack {\overset{\_}{f}(\lambda)} \right\rbrack^{2}\ {\lambda}}} = K}}}} & (9) \end{matrix}$

where K is a positive constant defined by the measurement units for the wavelength λ and the radiance P(λ). The units can be chosen so that K=1.

The integrals in (9) can be replaced with sums if the CMF's are defined at discrete λ values, i.e.:

$\begin{matrix} {{{\sum\limits_{\lambda}^{\;}\; {{\overset{\_}{d}(\lambda)}\ {\overset{\_}{e}(\lambda)}}} = {{\sum\limits_{\lambda}^{\;}\; {{\overset{\_}{d}(\lambda)}\ {\overset{\_}{f}(\lambda)}}} = {{\sum\limits_{\lambda}^{\;}\; {{\overset{\_}{e}(\lambda)}\ {\overset{\_}{f}(\lambda)}}} = 0}}}{{\sum\limits_{\lambda}^{\;}\; \left\lbrack {\overset{\_}{d}(\lambda)} \right\rbrack^{2}} = {{\sum\limits_{\lambda}^{\;}\; \left\lbrack {\overset{\_}{e}(\lambda)} \right\rbrack^{2}} = {{\sum\limits_{\lambda}^{\;}\; \left\lbrack {\overset{\_}{f}(\lambda)} \right\rbrack^{2}} = K}}}} & (10) \end{matrix}$

where the sums are taken over a discrete set of the λ values. The constant K can be different than in (9). Color matching functions will be called orthonormal herein if the satisfy the equations (9) or (10).

If S1 and S2 are two colors with DEF coordinates (D1,E1,F1) and (D2,E2,F2), a dot product of these colors can be defined as follows:

<S1,S2>=D1*D2+E1*E2+F1*F2  (11)

Thus, the DEF coordinate system can be thought of as a Cartesian coordinate system having mutually orthogonal axes D, E, F (FIG. 3), with the same measurement unit for each of these axes.

The dot product (11) does not depend on the color coordinate system as long as the color coordinate system is orthonormal in the sense of equations (9) or (10) and its CMF's are linear combinations of x(λ), y(λ), z(λ) (and hence of d(λ), ē(λ), f(λ)). More particularly, let T₁, T₂, T₃ be tristimulus values in a color coordinate system whose CMF's t₁ , t₂ , t₃ belong to a linear span Span( d(λ), ē(λ), f(A)) and satisfy the conditions (9) or (10). For the case of equations (9), this means that:

$\begin{matrix} {{{\int_{0}^{\infty}{{{\overset{\_}{t}}_{1}(\lambda)}\ {{\overset{\_}{t}}_{2}(\lambda)}{\lambda}}} = {{\int_{0}^{\infty}{{{\overset{\_}{t}}_{1}(\lambda)}\ {{\overset{\_}{t}}_{3}(\lambda)}{\lambda}}} = {{\int_{0}^{\infty}{{{\overset{\_}{t}}_{2}(\lambda)}\ {{\overset{\_}{t}}_{3}(\lambda)}{\lambda}}} = 0}}}{{\int_{0}^{\infty}{\left\lbrack {{\overset{\_}{t}}_{1}(\lambda)} \right\rbrack^{2}\ {\lambda}}} = {{\int_{0}^{\infty}{\left\lbrack {{\overset{\_}{t}}_{2}(\lambda)} \right\rbrack^{2}\ {\lambda}}} = {{\int_{0}^{\infty}{\left\lbrack {{\overset{\_}{t}}_{3}(\lambda)} \right\rbrack^{2}\ {\lambda}}} = K}}}} & (12) \end{matrix}$

with the same constant K as in (9). The discrete case (10) is similar. Suppose the colors S1, S2 have the T₁T₂T₃ coordinates (T_(1.1),T_(2.1),T_(3.1)) and (T_(1.2),T_(2.2),T_(3.2)) respectively. Then the dot product (11) is the same as

<S ₁ ,S ₂ >=T _(1.1) T _(1.2) +T _(2.1) T _(2.2) +T _(3.1) T _(3.2).

The brightness B of a color S can be represented as the length (the norm) of the vector S:

B=∥S∥=√{square root over (<S,S>)}=√{square root over (D ² +E ² +F ²)}  (13)

The Bef color coordinate system is defined as follows:

B=√{square root over (D ² +E ² +F ²)}

e=E/B

F=F/B  (14)

If B=0 (absolute black color), then e and f can be left undefined or can be defined in any way, e.g. as zeroes.

Since D is never negative, the D, E, F values can be determined from the B, e, f values as follows:

E=e×B

F=f×B

D=√{square root over (B ²−(e*B)²−(f*B)²)}{square root over (B ²−(e*B)²−(f*B)²)}=B√{square root over (1−e ² −f ²)}  (15)

The Bef system is convenient for brightness editing because the brightness can be changed by changing the B coordinate and leaving e and f unchanged. Thus, if it is desired to change from some value B to a value k×B for some factor k, the new Bef color coordinates B*,e*,f can be computed as:

B*=k×B

e*=e

f*=f  (16)

Here k>1 if the brightness is to be increased, and k<1 if the brightness is to be decreased. The transformation (16) corresponds to multiplying the D, E and F values by k:

D*=k×D

E*=k×E

F*=k×F  (17)

This transformation in turn corresponds to multiplying the color's radiance P(λ) by k (see equations (4)). The radiance multiplication by k is a good model for the intuitive understanding of brightness as a measure of the intensity of the color stimulus. Also, there is no color shift in the transformation (16), i.e. the color's chromatic perception does not change.

The brightness can be changed over the whole image or over a part of the image as desired. The brightness transformation can be performed using computer equipment known in the art. For example, in FIG. 4, a computer processor 410 receives the color coordinates B, e, f (from a memory, a network, or some other source) and also receives the factor k (which can be defined by a user via some input device, e.g. a keyboard or a mouse). The processor outputs the k×B, e, f coordinates. In some embodiments, this color editing is controlled by a user who watches the color on a monitor 420 before and after editing. To display the color on monitor 420, the processor 410 may have to convert the color from the Bef coordinate system to some other coordinate system suitable for the monitor 420, e.g. sRGB or some other system as defined by the monitor specification. The color conversion can be performed by converting the color between Bef and DEF as specified by equations (14) and (15), and between DEF and the XYZ system of FIG. 2 by equations (5) and (6). The color conversion between the XYZ coordinate system and the sRGB can be performed using known techniques.

Transformation (16) is a convenient way to perform expocorrection in a digital photographic camera (processor 410 can be part of the camera), or to obtain a result equivalent to expocorrection when editing a digital image.

Another color coordinate system that facilitates the brightness editing is the spherical coordinate system for the DEF space. This coordinate system BCH (Brightness, Chroma, Hue) is defined as follows (see also FIG. 3):

B=√{square root over (D ² +E ² +F ²)}  (18)

C (“chroma”) is the angle between the color S and the D axis;

H (“hue”) is the angle between (i) the orthogonal projection S_(EF) of the vector S on the EF plane and (ii) the E axis.

The term “chroma” has been used to represent a degree of saturation (see Malacara's book cited above). Recall that in the HSB system, the Saturation coordinate of a color represents the white amount in the color. In the BCH system, the C coordinate of a color is a good representation of saturation (and hence of chroma) because the C coordinate represents how much the color deviates from the white color D₆₅ represented by the D axis (E=F=0).

The H coordinate of the BCH system represents the angle between the projection S_(EF) and the red color represented by the E axis, and thus the H coordinate is a good representation of hue.

Transformation from BCH to DEF can be performed as follows:

D=B×cos C

E=B×sin C×cos H

F=B×sin C×sin H  (19)

Transformation from DEF to BCH can be performed as follows. The B coordinate can be computed as in (18). The C and H computations depend on the range of these angles. Any suitable ranges can be chosen. In some embodiments, the angle C is in the range [0,π/2], and hence

C=cos⁻¹(D/B)  (20)

In some embodiments, the angle H can be computed from the relationship:

tan H=F/E  (21A)

or

tan H=f/e  (21B)

where e and f are the Bef coordinates (14). For example, any of the following relations can be used:

H=tan⁻¹(F/E)+α

H=tan⁻¹(f/e)+α  (22)

where α depends on the range of H. In some embodiments, the angle H is measured from the positive direction of the E axis, and is in the range from 0 to 2π or −π to π. In some embodiments, one of the following computations is used:

H=arctg(E,F)

H=arctg(e,f)  (23)

where arctg is computed as shown in pseudocode in Appendix 1 at the end of this section before the claims.

Transformation from BCH to Bef can be performed as follows:

B=B

e=sin C×cos H

f=sin C×sin H  (24)

Transformation from Bef to BCH can be performed as follows:

B=B

C=cos⁻¹√{square root over (1−e ² −f ²)}, or C=sin⁻¹√{square root over (e ² +f ²)}

H=tan⁻¹(f/e)+α (see(22)), or H=arctg(e,f) (see Appendix 1).  (25)

As with Bef, the BCH system has the property that a change in the B coordinate without changing C and H corresponds to multiplying the tristimulus values D, E, F by some constant k (see equations (17)). The brightness editing is therefore simple to perform. In FIG. 5, the brightness editing is performed like in FIG. 4, with the C and H coordinates used instead of e and f.

The Bef and BCH systems are also suitable for contrast editing. In some embodiments, the contrast is enhanced by increasing the brightness difference between brighter and dimmer image portions. For the sake of illustration, suppose the image consists of a two-dimensional set of pixels p_(i) (i=1, 2, . . . ) with coordinates (x_(i),y_(i)), as shown in FIG. 6 for an image 610. Let B(Pd denote the brightness value (the B coordinate) at the pixel p_(i), and B*(p_(i)) denote the modified brightness to be computed to edit the contrast. Let B_(avg)(p_(i)) be some average brightness value, for example, the mean of the brightness values in some region R(p_(i)) containing the pixel p_(i):

$\begin{matrix} {{B_{avg}\left( p_{i} \right)} = {\frac{1}{N\left( p_{i} \right)} = {\sum\limits_{p \in {R{(p_{i})}}}^{\;}{B(p)}}}} & (26) \end{matrix}$

where N(p_(i)) is the number of the pixels in the region R(p_(i)). In the Bef system, for each pixel p_(i), the new coordinates B*(p_(i)), e*(p_(i)), f*(p_(i)) for the contrast adjustment are computed from the original coordinates B(p_(i)), e(p_(i)), f(p_(i)) as follows:

$\begin{matrix} {{B^{*}\left( p_{i} \right)} = {{B_{avg}^{1 - ɛ}\left( p_{i} \right)} \times {B^{ɛ}\left( p_{i} \right)}}} & (27.1) \\ {{e^{*}\left( p_{i} \right)} = {e\left( p_{i} \right)}} & (27.2) \\ {{f^{*}\left( p_{i} \right)} = {f\left( p_{i} \right)}} & (27.3) \end{matrix}$

Here, ε is some positive constant other than 1. Of note, the equation (27.1) implies that:

$\begin{matrix} {\frac{B^{*}\left( p_{i} \right)}{B_{avg}\left( p_{i} \right)} = \left( \frac{B\left( p_{i} \right)}{B_{avg}\left( p_{i} \right)} \right)^{ɛ}} & (28) \end{matrix}$

Thus, if ε>1, the contrast increases because the brightness range is increased over the image. If ε<1, the contrast decreases.

The contrast adjustment can be performed over pixels p_(i) of a part of the image rather than the entire image. Also, different ε values can be used for different pixels p_(i). Alternatively, the same ε value can be used for all the pixels.

Similarly, in the BCH system, the B coordinate is computed as in (27.1), and the C and H coordinates are unchanged:

$\begin{matrix} {{B^{*}\left( p_{i} \right)} = {{B_{avg}^{1 - ɛ}\left( p_{i} \right)} \times {B^{ɛ}\left( p_{i} \right)}}} & (29.1) \\ {{C^{*}\left( p_{i} \right)} = {C\left( p_{i} \right)}} & (29.2) \\ {{H^{*}\left( p_{i} \right)} = {H\left( p_{i} \right)}} & (29.3) \end{matrix}$

In some embodiments, the region R(p_(i)) is the entire image. Thus, the value B_(avg)(p_(i)) is constant, and can be computed only once for all the pixels p_(i). In other embodiments, different regions R(p_(i)) are used for different pixels. In FIG. 6, the region R(p_(i)) is a square centered at the pixel p_(i) and having a side of 5 pixels long (the length measured in pixels can be different along the x and y axes if a different pixel density is present at the two axes). In some embodiments, the region R(p_(i)) is a non-square rectangle centered at p_(i), or a circle or an ellipse centered at p_(i). In some embodiments, the regions R(p_(i)) have the same size and the same geometry for different pixels p_(i), except possibly at the image boundary.

In some embodiments, the regions R(p_(i)) corresponding to pixels p_(i) at the image boundary have fewer pixels than the regions corresponding to inner pixels p_(i). In other embodiments, the image is extended (or just the brightness values are extended) to allow the regions R(p_(i)) to have the same size for all the pixels p_(i). Different extensions are possible, and one extension is shown in FIG. 7 for the square regions R(p_(i)) of FIG. 6. The image 610 has n rows (y=0, . . . , n−1) and m columns (x=0, . . . , m−1). The image is extended as follows. First, in each row y, the brightness values are extended by two pixels to the left (x=−1, −2) and two pixels to the right (x=m, m+1). The brightness values are extended by reflection around the original image boundaries, i.e. around the columns x=0 and x=m−1. For example, B(−1,0)=B(1,0), B(m,0)=B(m−2,0), and so on. Then in each column (including the extension columns x=−2, −1, m, m+1), the brightness values are extended by two pixels up and two pixels down using reflection. FIG. 7 shows the pixel's coordinates for each pixel and the brightness value for each extension pixel.

Efficient algorithms exist for calculating the mean values B_(avg)(p_(i)) for a plurality of adjacent pixels p_(i) for rectangular regions R(p_(i)). One such algorithm is illustrated in pseudocode in Appendix 2 at the end of this section.

FIGS. 8 and 9 are brightness graphs illustrating the brightness before and after editing near a color boundary for one example. For simplicity, the image is assumed to be one-dimensional. Each pixel p has a single coordinate x. The coordinate x is the coordinate of some predetermined point in the pixel, e.g. the left edge of the pixel (the x coordinates are discrete values). The color boundary occurs at some pixel x=x_(o). The original brightness B(x)=a for pixels x<x₀, B(x)=b for x≧x_(o), where a<b. Each region R(p_(i))=R(x) is an interval [x−R,x+R] of some constant radius R with the center at the point x.

In FIG. 8, ε>1. If x>x_(o)+R or x<x_(o)−R, the average B_(avg)(x)=B(x). Hence (see equation (28)), B*(x)=B(x). As x decreases from x_(o)+R towards x_(o), the average B_(avg)(x) decreases, so B*(x) increases hyperbolically:

B*(x)=c ₁(c ₂ ×x+c ₃)^(1-ε)  (29A)

where c₁, c₂, c₃ are some constants. When x increases from x_(o)−R towards x_(o), the average B_(avg)(x) increases, so B*(x) decreases hyperbolically according to equation (29A), with possibly some other constants c₁, c₂, c₃.

In FIG. 9, ε<1. Again, if x>x_(o)+R or x<x_(o)−R, then B*(x)=B(x). As x decreases from x_(o)+R towards x_(o), the average B_(avg)(x) decreases, so B*(x) decreases parabolically according to equation (29A). When x increases from x_(o)−R towards x_(o), the average B_(avg)(x) increases, so B*(x) increases parabolically according to equation (29A), with possibly some other constants c₁, c₂, c₃. The B function does not have to be continuous at x=x_(o).

In some embodiments, B_(avg) is a weighted average:

$\begin{matrix} {{B_{avg}\left( p_{i} \right)} = {\frac{1}{N\left( p_{i} \right)} = {\sum\limits_{p \in {R{(p_{i})}}}^{\;}{{w\left( {p,p_{i}} \right)}{B(p)}}}}} & \left( {29\; B} \right) \end{matrix}$

where w(p,p_(i)) are some weights. In some embodiments, each value w(p,p_(i)) is completely defined by (x-x_(i),y-y_(i)) where (x,y) are the coordinates of the pixel p and (x_(i),y_(i)) are the coordinates of the pixel p_(i). In some embodiments, all the weights are positive. In some embodiments, the sum of the weights is 1. The sum of the weights can also differ from 1 to obtain a brightness shift. The brightness shift and the contrast change can thus be performed at the same time, with less computation than would be needed to perform the two operations separately.

In some embodiments, the function

$\left( \frac{B\left( p_{i} \right)}{B_{avg}\left( p_{i} \right)} \right)^{ɛ}$

in equation (28) is replaced with some other predefined non-identity function

${f\left( \frac{B\left( p_{i} \right)}{B_{avg}\left( p_{i} \right)} \right)}.$

Thus,

$\begin{matrix} {{B^{*}\left( p_{i} \right)} = {{B_{avg}\left( p_{i} \right)} \times {f\left( \frac{B\left( p_{i} \right)}{B_{avg}\left( p_{i} \right)} \right)}}} & \left( {29\; C} \right) \end{matrix}$

In some embodiments, the function f is strictly increasing. In some embodiments, f(1)=1, but this is not necessary if a brightness shift is desired. The brightness shift and the contrast change can thus be performed at the same time, with less computation than would be needed to perform the two operations separately.

The contrast editing techniques described above can be used to adjust either the global contrast, i.e. when the region R(p_(i)) is the whole image, or the local contrast, when the region R(p_(i)) is only a part of the image. In some embodiments, the region R(p_(i)) contains 10% to 30% of the image in the local contrast adjustments.

The same techniques can be used to change the image sharpness if the region R(p_(i)) is small, e.g. 1% of the image or less. In some embodiments, the region R(p_(i)) is contained in a rectangle of at most 31 pixels by 31 pixels, with the center at pixel p_(i). Even smaller outer rectangles can be used, e.g. 21×21 pixels, or 11×11 pixels, and other rectangles. The image may contain thousands, millions, or some other number of pixels. In FIG. 10, a computer system (such as shown in FIG. 4 or 5 for example) receives an image editing command at step 1010. In a non-limiting example, the command can be issued by a user via a graphical user interface. The command may specify contrast or sharpness editing. If the command is for contrast editing (step 1020), the computer system sets the size of region R(p_(i)) to a suitable value (e.g. 10%˜30% of the image), or defines the region R(p_(i)) to be a large specific region (e.g. the whole image). If the command is for sharpness editing (step 1030), the computer system sets the size of region R(p_(i)) to a small value (e.g. 1% of the image, or a rectangle of 11 pixels by 9 pixels), or defines the region R(p_(i)) to be a small specific region. At step 1040, an editing algorithm is executed as described above with the region or regions R(p_(i)) as defined at step 1020 or 1030. Step 1040, or steps 1020-1040, can be repeated for different pixels p_(i). The image processing system can be made simpler and/or smaller due to the same algorithm being used for the contrast and sharpness editing.

The contrast and sharpness editing can also be performed on monochromatic images. These images are formed with a single color of possibly varying intensity. In such images, the brightness B represents the color's intensity. In some embodiments, the brightness B is the only color coordinate. The same techniques can be employed for this case as described above except that the equations (27.2), (27.3), (29.2), (29.3) can be ignored.

The Bef and BCH systems are also suitable for changing an image's dynamic range according to equations (4A)-(4E). (Of note, in FIGS. 4 and 5, the dynamic range is unchanged since B*_(max)/B*_(min)=B_(max)/B_(min).) In FIG. 11, the brightness is changed as in equation (4B) with the C and H coordinates remaining unchanged. Alternatively, the Bef system can be used, with B edited according to (4B) and with the e and f coordinates unchanged. For the sake of illustration, suppose the image consists of a two-dimensional set of pixels p_(i) (i=1, 2, . . . ) with coordinates (x_(i),y_(i)), as shown in FIG. 6 for image 610. Let B(p_(i)) denote the brightness value (the B coordinate) at the pixel p_(i), and B*(p_(i)) denote the modified brightness. B_(avg)(p_(i)) may be some average brightness value, for example, the mean of the brightness values in some region R(p_(i)) containing the pixel p_(i) as in (26). In equation (4B):

B₀ is some pre-defined brightness level;

B_(avg)(p_(i)) is some average brightness value, e.g. the mean brightness over a region R(p_(i)) containing the pixel p_(i) as in (26), or a weighted average as described below in connection with equation (36);

ε is a pre-defined constant. If it is desired to increase the brightness at the pixels p_(i) at which B_(avg)(p_(i))<B₀, then ε is positive (in some embodiments, ε is in the interval (0,1)). Good results can be achieved for B₀ being the maximum brightness and 0<ε≦½. If it is desired to reduce the brightness (e.g. to deepen the shadow) at the pixels p_(i) at which B_(avg)(p_(i))<B₀, then ε is negative (e.g. in the interval (−1,0)).

In FIG. 6, the region R(p_(i)) is a square centered at the pixel p_(i) and having a side of 5 pixels long (the length measured in pixels can be different along the x and y axes if a different pixel density is present at the two axes). In some embodiments, the region R(p_(i)) is a non-square rectangle centered at p_(i), or a circle or an ellipse centered at p_(i). In some embodiments, the regions R(p_(i)) have the same size and the same geometry for different pixels p_(i), except possibly at the image boundary. The region R(p_(i)) does not have to be symmetric or centered at p_(i).

In some embodiments, the regions R(p_(i)) corresponding to pixels p_(i) at the image boundary have fewer pixels than the regions corresponding to inner pixels p_(i). In other embodiments, the image is extended using any one of the methods discussed above in connection with contrast editing (see FIG. 7 for example).

In some embodiments, the regions R(p_(i)) are chosen such that the brightness does not change much in each region (e.g. such that the region does not cross a boundary at which the derivative of the brightness changes by more than a predefined value).

FIG. 12 illustrates the brightness values B and B* along an axis x assuming a one-dimensional image. For simplicity, the brightness is shown as if changing continuously, i.e. the pixels are assumed to be small. The original brightness B(x)=B(p_(i)) is shown by thin lines, and the modified brightness B* by thick lines. The value B₀ is chosen to equal B_(max) (the maximum brightness over the image), and ε is about ½. In this example, the minimum brightness value B_(min)=B_(max)/4. B_(avg)(x) is the mean brightness in some neighborhood R(x) of the point x.

The original brightness B has large jumps at points x=x₂ and x=x₃. It is assumed that R(x) is small relative to the values x₂-x₁, x₃-x₂, and x₄-x₃. When x is between x₁ and x₂, the original brightness B is near B_(min), i.e. about B₀/4. The value B_(avg) is also near B₀/4, so B* is about 2B. The difference (B₂*−B₁*) is about double the difference (B₂−B₁) between the original brightness values. Therefore, the image details become more visible in the dimmest area.

When x₂<x<x₃, the original brightness B is near the value 2B_(min)=B₀/2. As x approaches x₂ from the left, the brightness average B_(avg) increases due to contribution of the pixels to the right of x₂, so the ratio B*/B tends to decrease. When x increases past x₂, this ratio further decreases. When x>x₃, the original brightness B is close to the maximum value B₀, so the modified brightness B* is close to the original brightness. Therefore, the brightest area is almost unchanged.

The coefficient (B₀/B_(avg)(p_(i)))^(ε) in (4B) is a function of B_(avg), so this coefficient changes smoothly over the image. As a result, the visual effect is highlighting of the entire dimmer areas rather than just individual dim pixels (a generally dim area may include individual bright pixels). The local dynamic range therefore does not change much. The smoothness degree can be varied by varying the size of the region R(p_(i)) over which the average B_(avg) is computed.

In FIG. 13, the regions R(p_(i)) are chosen not to cross the boundaries x=x₁, x=X₂, x=x₃, x=x₄. Therefore, when x approaches x₂ from the left, the brightness average B_(avg)(x) is not affected by the brightness values to the right of x₂, so the ratio B*/B does not change much. More generally, this ratio does not change much in each of the intervals (x₁,x₂), (x₂,x₃), (x₃,x₄).

In FIG. 14, B₀ is set to the minimum brightness value B_(min). This type of editing is useful when the monitor displays the dimmest areas adequately but the brightest areas are out of the monitor's dynamic range. The transformation (4B) can be used with a positive ε, e.g. ε=½. The brightness is reduced in image areas in which B_(avg)>B₀. The brightness is reduced more in the brighter areas, less in the dimmer areas. The regions R(p_(i)) are as in FIG. 12, but they could be chosen as in FIG. 13 or in some other manner.

FIG. 15 illustrates how the values B₀ and ε can be chosen in some embodiments. Suppose an image editing system (e.g. a computer) is provided with a maximum brightness B_(max) and a minimum brightness B_(min). These can be, for example, the minimum and maximum brightness of the original image or image portion, or the minimum and maximum brightness to be edited, or the minimum and maximum brightness of a system which created the original image. The image editing system is also provided with a target maximum brightness B*_(max) and a target minimum brightness B*_(min). Substituting the values B_(max), B_(min), B*_(max), B*_(min) into (4B), and assuming for simplicity that B_(avg)(p_(i))=B(p_(i)) when B(p_(i)) is equal to B_(min) or B_(max), we obtain:

B* _(max) =B _(max)×(B ₀ /B _(max))^(ε)  (30A)

B* _(min) =B _(min)×(B ₀ /B _(min))^(ε)  (30B)

These two equations can be solved for B₀ and ε. (For example, the equation (30A) can be divided by (30B) to eliminate B₀ and solve for ε, and then the ε solution can be substituted into (30A) or (30B) to find B₀.) The solution is:

$\begin{matrix} {ɛ = \frac{{\log \; {DR}} - {\log \; {DR}^{*}}}{\log \; {DR}}} & \left( {31\; A} \right) \\ {B_{0} = {B_{\max}^{1 - \frac{1}{ɛ}} \cdot \left( B_{\max}^{*} \right)^{\frac{1}{ɛ}}}} & \left( {31\; B} \right) \end{matrix}$

Here DR=B_(max)/B_(min), and DR*=B*_(max)/B*_(min). The logarithm can be to any base.

In FIG. 16, the image editing system is provided a starting dynamic range DR and a target dynamic range DR*. It is desired to obtain the values B₀ and ε so as to convert some predefined brightness value B₁ to a predefined brightness value B₁*. Using the equations (30A), (30B), we obtain the value ε as in (31A). Substituting B₁ and B₁* into (4B), and assuming for simplicity that B_(avg)(p_(i))=B(p_(i)) when B(p_(i)) is equal to B₁, we obtain:

B* ₁ =B ₁×(B ₀ /B ₁)^(ε)  (32)

Using the expression (31A) for ε, we obtain:

$\begin{matrix} {B_{0} = {B_{1}^{1 - {1/ɛ}} \cdot \left( B_{1}^{*} \right)^{1/ɛ}}} & (33) \end{matrix}$

In (4B), the value B₀ can be any value, not necessarily the minimum or maximum brightness. The brightness values below B₀ are modified as in FIG. 12 in some embodiments, and the brightness values above B₀ as in FIG. 14. In some embodiments, B₀ is chosen as the best brightness value for a given display device, i.e. the value at which (or near which) the display device provides the best image quality. The transformation (4B) with ε>0 tends to squeeze the brightness values closer to B₀. When ε<0, the transformation (4B) tends to spread the brightness values wider above and/or below B₀.

Some embodiments use equations other than (4B). Note equation (4A). In some embodiments,

B*(p _(i))=B(p _(i))×f(B _(avg)(p _(i)))  (34)

where f(y) is a non-negative function strictly monotonic in y. In some embodiments,

B*(p _(i))=f(B(p _(i)),B _(avg)(p _(i)))  (35)

where f(x,y) is a non-negative function which is strictly monotonic in y for each fixed x=B(p_(i)). In some embodiments, the function is chosen to be strictly decreasing in y. Hence, as B_(avg) increases, the modified brightness B* decreases for a given original brightness value B. In other embodiments, the function is chosen to be strictly increasing in y for each fixed x. In some embodiments, f(x,y) is strictly increasing in x for each fixed y. In some embodiments, f(x,B₀)=x for all x for a predefined value B₀. Hence, if the image contains pixels with an average brightness B_(avg)=B₀, their brightness is unchanged. In some embodiments, f(x,B₀)=k×x where k is a predefined constant, i.e. the brightness is multiplied by the predefined constant whenever B_(avg)=B₀. The transformation (35) can be applied to an entire image (e.g. a rectangular array of pixels) or a part of the image.

In some embodiments, B_(avg) is a weighted average:

$\begin{matrix} {{B_{avg}\left( p_{i} \right)} = {\frac{1}{N\left( p_{i} \right)} = {\sum\limits_{p \in {R{(p_{i})}}}^{\;}{{w\left( {p,p_{i}} \right)}{B(p)}}}}} & (36) \end{matrix}$

where w(p,p_(i)) are some weights. In some embodiments, each value w(p,p_(i)) is completely defined by (x-x_(i),y-y_(i)) where (x,y) are the coordinates of the pixel p and (x_(i),y_(i)) are the coordinates of the pixel p_(i). In some embodiments, all the weights are positive. In some embodiments, the sum of the weights is 1. The sum of the weights can also differ from 1 to obtain a brightness shift. The brightness shift and the dynamic range change can thus be performed at the same time, with less computation than would be needed to perform the two operations separately.

The editing can also be performed on monochromatic images. These images are formed with a single color of possibly varying intensity. In such images, the brightness B represents the color's intensity. In some embodiments, the brightness B is the only color coordinate.

The invention is not limited to the Bef and BCH coordinate systems, or the brightness values given by equation (13). In some embodiments, the brightness B is defined in some other way such that multiplication of the brightness by a value k in some range of positive values corresponds to multiplication of all the tristimulus values by the same value. In some embodiments, the chromaticity coordinates remain unchanged. For example, the brightness can be defined by the equation (49) discussed below.

The Bef and BCH systems are also convenient for performing hue and saturation transformations. In these transformations, the brightness B is unchanged. The hue transformation corresponds to rotating the color vector S (FIG. 3) around the D axis. The chroma coordinate C is unchanged for the hue transformation. Suppose the color vector rotation is to be performed by an angle φ, i.e. the angle H is changed to H+φ. In the BCH system, this transformation is given by the following equations:

B*=B

C*=C

H*=H+φ  (37)

-   -   while H*>H_(max) do H*=H−2π     -   while H*≦H_(min) do H*=H+2π         The H computation places the result into the proper range from         H_(min) to H_(max), e.g. from −π to π or from 0 to 2π. If the H*         value is outside the interval, then 2π is added or subtracted         until the H* value in the interval is obtained. These additions         and subtractions can be replaced with more efficient techniques,         such as division modulo 2π, as known in the art. In some         embodiments, the “>” sign is replaced by “≧” and “≦” by “<”         (depending on whether the point H_(min) or H_(max) is in the         allowable range of the H values).

In the Bef system, the hue transformation is given by the following equations:

B*=B

e*=e×cos φ+f×sin φ

f*=f×cos φ−e×sin φ  (38)

For a given hue H, some embodiments specify a maximum saturation value C_(max)(H). This can be done for one or more hue values H, possibly for all the hue values. If C exceeds C_(max)(H), the corresponding color (B,C,H) may be invisible to a human being, or may be impossible to display on a given display device. Thus, for a given H, the value C_(max)(H) may be specified as the maximum saturation visible to humans, or the maximum saturation reproducible on a display device, or as some value below the maximum visible or reproducible saturation. In some embodiments, if the hue is changed as in (37), then the saturation is changed so that C* does not exceed C_(max)(H*). For example:

B*=B

H*=H+φ

-   -   while H*>H_(max) do H*=H−2π     -   while HL≦H_(min) do H*=H+2π

C*=C×C_(max)(H*)/C_(max)(H)  (38A)

C* is computed after H*. If C did not exceed C_(max)(H), then C* will not exceed C_(max)(H*).

A saturation transformation can be specified as the change in the chroma angle C, e.g. multiplying C by some positive constant k. The hue and the brightness are unchanged. Since D is never negative, the C coordinate is at most π/2. The maximum C value C_(max)(H) can be a function of the H coordinate. In the BCH system, the saturation transformation can be performed as follows:

B*=B

C*=k×C; if C*>C _(max)(H) then C=C _(max)(H)

H*=H  (39)

In the Bef system, it is convenient to specify the desired saturation transformation by specifying the desired change in the e and f coordinates. The saturation change corresponds to rotating the S vector in the plane perpendicular to the EF plane. The angle H remains unchanged. Hence, the ratio e/f=tan H is unchanged, so the saturation transformation can be specified by specifying the ratio e*/e=f*/f. Denoting this ratio by k, the transformation can be performed as follows:

B*=B

e*=k×e

f*=k×f  (40)

Equations (14), (15) imply that

e ² +f ²≦1  (41)

Therefore, the values e*, f* may have to be clipped. In some embodiments, this is done as follows:

g=√{square root over ((e*)²+(f)*²)}{square root over ((e*)²+(f)*²)}

if g>1, then

e*=e/g

f*=f/g  (42)

The Bef and BCH systems are also convenient for converting a color image to a monochromatic image (i.e. a polychromatic image to a monochromatic image), or for changing the color (e.g. the hue) of a monochromatic image. In these transformations, the brightness B can be unchanged. The transformation is performed in the Bef system by setting the e and f coordinates to some constant values e₀ and f₀, as shown in FIG. 17. More particularly, computer processor 410 receives the color coordinates B, e, f and also receives the values e₀, f₀. The processor outputs the coordinates B, e₀, f₀ for each pixel:

B*=B

e*=e₀

f*=f₀  (42.1)

In the BCH system, the monochromatic transformation is given by the following equations:

B*=B

C*=C₀

H*=H₀  (42.2)

where C₀, H₀ are some input values corresponding to the desired color. Computer processor 410 (FIG. 18) receives the color coordinates B, C, Hand also receives the values C₀, H₀. The processor outputs the coordinates B, C₀, H₀ for each pixel according to (42.2).

In some embodiments, the transformation (42.1) or (42.2) can be combined with some brightness editing. For example, in at least a portion of the image, the output brightness B* can be computed as in (16) for some input value k, or as in (27.1) or (29A). Other brightness editing types are also possible. See e.g. U.S. patent application Ser. No. 11/377,161, entitled “EDITING (INCLUDING CONTRAST AND SHARPNESS EDITING) OF DIGITAL IMAGES”, filed on Mar. 16, 2006 by Sergey N. Bezryadin and incorporated herein by reference.

The invention includes systems and methods for color image editing and display. The Bef and BCH color coordinates can be transmitted in a data carrier such as a wireless or wired network link, a computer readable disk, or other types of computer readable media. The invention includes computer instructions that program a computer system to perform the brightness editing and color coordinate system conversions. Computer programs with such computer instructions can be transmitted in a data carrier such as a wireless or wired network link, a computer readable disk, or other types of computer readable media. Some embodiments of the invention use hardwired circuitry instead of, or together with, software programmable circuitry.

In some embodiments, the Bef or BCH color coordinate system can be replaced with their linear transforms, e.g. the coordinates (B+e,e,f) or (2B,2e,2f) can be used instead of (B,e,f). The angle H can be measured from the E axis or some other position. The angle C can also be measured from some other position. The invention is not limited to the order of the coordinates. The invention is not limited to DEF, XYZ, or any other color coordinate system as the initial coordinate system. In some embodiments, the orthonormality conditions (9) or (10) are replaced with quasi-orthonormality conditions, i.e. the equations (9) or (10) hold only approximately. More particularly, CMF's t ₁(λ), t ₂(λ), t ₃(λ) will be called herein quasi-orthonormal with an error at most ε if they satisfy the following conditions:

1. each of

${\int_{0}^{\infty}{{\overset{\_}{t_{1}}(\lambda)}{\overset{\_}{t_{2}}(\lambda)}\ {\lambda}}},{\int_{0}^{\infty}{{\overset{\_}{t_{1}}(\lambda)}{\overset{\_}{t_{3}}(\lambda)}\ {\lambda}}},\ {\int_{0}^{\infty}{{\overset{\_}{t_{2}}(\lambda)}{\overset{\_}{t_{3}}(\lambda)}\ {\lambda}}}$

is in the interval [−ε,ε], and 2. each of

${\int_{0}^{\infty}{\left\lbrack {\overset{\_}{t_{1}}(\lambda)} \right\rbrack^{2}\ {\lambda}}},{\int_{0}^{\infty}{\left\lbrack {\overset{\_}{t_{2}}(\lambda)} \right\rbrack^{2}\ {\lambda}}},{\int_{0}^{\infty}{\left\lbrack {\overset{\_}{t_{3}}(\lambda)} \right\rbrack^{2}\ {\lambda}}}$

is in the interval [K−ε,K+ε] for positive constants K and ε. In some embodiments, ε is 0.3K, or 0.1K, or some other value at most 0.3K, or some other value. Alternatively, the CMF's will be called quasi-orthonormal with an error at most ε if they satisfy the following conditions: 1. each of

${\sum\limits_{\lambda}{{\overset{\_}{t_{1}}(\lambda)}{\overset{\_}{t_{2}}(\lambda)}}},{\sum\limits_{\lambda}{{\overset{\_}{t_{1}}(\lambda)}{\overset{\_}{t_{3}}(\lambda)}}},{\sum\limits_{\lambda}{{\overset{\_}{t_{2}}(\lambda)}{\overset{\_}{t_{3}}(\lambda)}}}$

is in the interval [−ε,ε], and 2. each of

${\sum\limits_{\lambda}\left\lbrack {\overset{\_}{t_{1}}(\lambda)} \right\rbrack^{2}},{\sum\limits_{\lambda}\left\lbrack {\overset{\_}{t_{2}}(\lambda)} \right\rbrack^{2}}\ ,{\sum\limits_{\lambda}\left\lbrack {\overset{\_}{t_{3}}(\lambda)} \right\rbrack^{2}}$

is in the interval [K−ε,K+ε] for positive constants K and E. In some embodiments, ε is 0.3K, or 0.1K, or some other value at most 0.3K, or some other value. Orthonormal functions are quasi-orthonormal, but the reverse is not always true. If ε=0.1K, the functions will be called 90%-orthonormal. More generally, the functions will be called n %-orthonormal if ε is (100−n) % of K. For example, for 70%-orthonormality, ε=0.3K

The invention is not limited to the orthonormal or quasi-orthonormal CMF's or to any particular white color representation. For example, in some embodiments, the following color coordinate system (S₁,S₂,S₃) is used for color editing:

S ₁=√{square root over (X ² +Y ² +Z ²)}

S ₂ =X/S ₁

S ₃=Z/S₁  (43)

The XYZ tristimulus values in (43) can be replaced with linear RGB tristimulus values or with some other tristimulus values T₁, T₂, T₃, e.g.:

S ₁=√{square root over (T ₁ ² +T ₂ ² +T ₃ ²)}

S ₂ =T ₂ /S ₁

S ₃ =T ₃ /S ₁.  (44)

If T₁ can be negative, than the sign of T₁ can be provided in addition to the coordinates. Alternatively the sign of T₁ can be incorporated into one of the S₁, S₂, and/or S₃ values, for example:

S ₁=Sign(T ₁)×√{square root over (T ₁ ² +T ₂ ² +T ₃ ²)}  (45)

The brightness editing can still be performed by multiplying the S₁ coordinate by k, with the S₂ and S₃ values being unchanged.

The BCH coordinate system can be constructed from linear systems other than DEF, including orthonormal and non-orthonormal, normalized and non-normalized systems. In some embodiments, a coordinate system is used with coordinates (S₁,S₂,S₃), where S₁ is defined as in (44) or (45), and the coordinates S₂ and S₃ are defined in a way similar to (20)-(23), e.g.:

S ₂=cos⁻¹(T ₁ /B)

S ₃=tan⁻¹(T ₃ /T ₂)+α  (46)

where α is as in (22), or

S ₃=arctg(T ₂ ,T ₃)  (47)

In some embodiments, the value B is the square root of some other quadratic polynomial of in T₁, T₂, T₃:

$\begin{matrix} {B = \sqrt{{g_{11}T_{1}^{2}} + {g_{22}T_{2}^{2}} + {g_{33}T_{3}^{2}} + {g_{12}T_{1}T_{2}} + {g_{13}T_{1}T_{3}g_{23}T_{2}T_{3}}}} & (48) \end{matrix}$

wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ are predefined constants, and g₁₁, g₂₂, g₃₃ are not equal to zero (e.g. g₁₁, g₂₂, g₃₃ are positive). Linear transforms result in different mathematical expressions of the coordinates without necessarily changing the values of the coordinates. For example, the coordinate system may use coordinates S₁, S₂, S₃ or their linear transform, wherein S₁ is defined by the value B, or S₁ is defined by B and the sign of a predefined function of one or more of T₁, T₂, T₃. In some embodiments

$B = \sqrt{{\alpha_{1}^{2}\left( {T_{1},T_{2},T_{3}} \right)} + {\alpha_{2}^{2}\left( {T_{1},T_{2},T_{3}} \right)} + {\alpha_{3}^{2}\left( {T_{1},T_{2},T_{3}} \right)}}$ wherein α₁(T₁, T₂, T₃) = α₁₁ × T₁ + α₁₂ × T₂ + α₁₃ × T₃ α₂(T₁, T₂, T₃) = α₂₁ × T₁ + α₂₂ × T₂ + α₂₃ × T₃ α₃(T₁, T₂, T₃) = α₃₁ × T₁ + α₃₂ × T₂ + α₃₃ × T₃

wherein α₁₁, α₁₂, α₁₃, α₂₁, α₂₂, α₂₃, α₃₁, α₃₂, α₃₃ are predefined numbers such that the following matrix Λ is non-degenerate:

$\Lambda = \begin{bmatrix} \alpha_{11} & \alpha_{12} & \alpha_{13} \\ \alpha_{21} & \alpha_{22} & \alpha_{23} \\ \alpha_{31} & \alpha_{32} & \alpha_{33} \end{bmatrix}$

In some embodiments, the coordinate S₁ is defined by the value B and by a sign of a predefined function of one or more of T₁, T₂, T₃. The function can be one of α₁(T₁,T₂,T₃), α₂(T₁,T₂,T₃), α₃(T₁,T₂,T₃). Clearly, the values T₁′=α₁(T₁,T₂,T₃), T₂′=α₂(T₁,T₂,T₃), T₃′=α₃(T₁,T₂,T₃) are also tristimulus values. In some embodiments, the coordinate S₂ is defined by a value β(T₁,T₂,T₃)/B, wherein

β(T ₁ ,T ₂ ,T ₃)=β₁ ×T ₁+β₂ ×T ₂+β₃ ×T ₃,

wherein β₁, β₂, β₃ are predefined numbers at least one of which is not equal to zero, or the coordinate S₂ is defined by the value β(T₁,T₂,T₃)/B and the sign of a predefined function of one or more of T₁, T₂, T₃. The coordinate S₃ is defined by a value γ(T₁,T₂,T₃)/B, wherein

γ(T ₁ ,T ₂ ,T ₃)=γ₁ ×T ₁+γ₂ ×T ₂+γ₃ ×T ₃,

wherein γ₁, γ₂, γ₃ are predefined numbers at least one of which is not equal to zero, and γ(T₁,T₂,T₃) is not a multiple of β(T₁,T₂,T₃), or the coordinate S₃ is defined by the value γ(T₁,T₂,T₃)/B and the sign of a predefined function of one or more of T₁, T₂, T₃. In some embodiments, a value cos S₂ is defined by a value β(T₁,T₂,T₃)/B, wherein

β(T ₁ ,T ₂ ,T ₃)=β₁ ×T ₁+β₂ ×T ₂+β₃ ×T ₃,

wherein β₁, β₂, β₃ are predefined numbers at least one of which is not equal to zero, or the value cos S₂ is defined by the value β(T₁,T₂,T₃)/B and the sign of a predefined function of one or more of T₁, T₂, T₃. In some embodiments, a value tan S₃ is defined by a value γ(T₁,T₂,T₃)/δ(T₁,T₂,T₃), wherein

γ(T ₁ ,T ₂ ,T ₃)=γ₁ ×T ₁+γ₂ ×T ₂+γ₃ ×T ₃,

δ(T ₁ ,T ₂ ,T ₃)=δ₁ ×T ₁δ₂ ×T ₂+δ₃ ×t ₃,

wherein γ₁, γ₂, γ₃ are predefined numbers at least one of which is not equal to zero, and δ₁, δ₂, δ₃ are predefined numbers at least one of which is not equal to zero, or the value tan S₃ is defined by the value γ(T₁,T₂,T₃)/δ(T₁,T₂,T₃) and the sign of a predefined function of one or more of T₁, T₂, T₃. In some embodiments, β(T₁,T₂,T₃) is one of α₁(T₁,T₂,T₃), α₂(T₁,T₂,T₃), α₃(T₁,T₂,T₃); γ(T₁,T₂,T₃) is another one of α₁(T₁,T₂,T₃), α₂(T₁,T₂,T₃), α₃(T₁,T₂,T₃); and δ(T₁,T₂,T₃) is the third one of α₁(T₁,T₂,T₃), α₂(T₁,T₂,T₃), α₃(T₁,T₂,T₃). In some embodiments, any color whose tristimulus values T₁,T₂,T₃ are such that α₁(T₁,T₂,T₃) is not zero and α₂(T₁,T₂,T₃)=α₃(T₁,T₂,T₃)=0, is a white or a shade of gray. This can be D₆₅ or some other white color. In some embodiments, a monochromatic red color of a predefined wavelength has tristimulus values T₁, T₂, T₃ such that α₂(T₁,T₂,T₃) is positive and α₃(T₁,T₂,T₃)=0. In some embodiments, α₁(T₁,T₂,T₃), α₂(T₁,T₂,T₃), α₃(T₁,T₂,T₃) are tristimulus values corresponding to 70%-orthonormal color matching functions. In some embodiments, up to a constant multiple, Λ is an orthonormal matrix, i.e. ΛΛ^(T)=I, where Λ^(T) is a transpose of Λ, and I is the identity matrix, i.e.

$I = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$

We will also call the matrix orthonormal if ΛΛ^(T)=c×I where c is a non-zero number. If the elements of ΛΛ^(T) are each within c×n/100 of the respective elements of a matrix c×I for some c and n, then the matrix Λ will be called (100−n) %-orthonormal. For example, if the elements of ΛΛ^(T) are each within 0.3×c of the respective elements of a matrix c×I (i.e. for each element λ_(i,j) of matrix ΛΛ^(T), |λ_(i,j)−e_(i,j)|≦0.3×c where e_(i,j) is the corresponding element of the matrix c×I), the matrix Λ will be called 70%-orthonormal. In some embodiments, the matrix Λ is 70% or more percent orthonormal (e.g. 90%-orthonormal).

The tristimulus values T₁, T₂, T₃, or the corresponding color matching functions, do not have to be normalized in any way. In some prior art systems, the color matching functions are normalized to require that the integral of each color matching function be equal to 1. In the XYZ system of FIG. 2, there is a normalizing condition X=Y=Z for a pre-defined, standard white color with a constant spectral power distribution function P(Z). The invention is not limited by any such requirements.

The invention is not limited to the two-dimensional images (as in FIG. 6). The invention is applicable to pixel (bitmap) images and to vector graphics. Colors can be specified separately for each pixel, or a color can be specified for an entire object or some other image portion. The invention is not limited to a particular way to specify the brightness transformation or any other transformations. For example, the brightness transformation can be specified by a value to be added to the brightness (B*=B+k) or in some other way. Other embodiments and variations are within the scope of the invention, as defined by the appended claims.

Some aspects of the invention are as follows:

Aspect 1 is a manufacture comprising one or more computer-readable and computer-executable computer instructions operable to cause a computer system to perform a method comprising generating digital data representing coordinates of a color S in a first coordinate system, wherein the color S has tristimulus values T₁, T₂, and T₃ in a second coordinate system, wherein the coordinates in the first coordinate system comprise coordinates S₁, S₂, S₃, or are a linear transformation of the coordinates S₁, S₂, S₃, wherein:

(A) the coordinate S₁ is defined by a value

$B = \sqrt{{g_{11}T_{1}^{2}} + {g_{22}T_{2}^{2}} + {g_{33}T_{3}^{2}} + {g_{12}T_{1}T_{2}} + {g_{13}T_{1}T_{3}} + {g_{23}T_{2}T_{3}}}$

wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ are predefined constants, and g₁₁, g₂₂, g₃₃ are not equal to zero, or

(B) the coordinate S₁ is defined by the value B and by a sign of a predefined function of one or more of T₁, T₂, T₃;

the method comprising:

(A) obtaining coordinates of the color S in a coordinate system other than the first coordinate system; and

(B) generating the value B and/or the coordinate S₁ and/or the linear transform of the coordinates S₁, S₂, S₃ from the coordinates of the color S in said coordinate system other than the first coordinate system.

Aspect 2 is a manufacture comprising one or more computer-readable and computer-executable computer instructions operable to cause a computer system to perform a method comprising generating digital data representing coordinates of a color S in a first coordinate system, wherein the color S has tristimulus values T₁, T₂, and T₃ in a second coordinate system, wherein the coordinates in the first coordinate system comprise coordinates S₁, S₂, S₃, or are a linear transformation of the coordinates S₁, S₂, S₃, wherein S₁ is a non-linear function of one or more of T₁, T₂, T₃, wherein multiplication of all of the tristimulus values T₁, T₂, and T₃ by any number in the second coordinate system corresponds to multiplying the coordinate S₁ by the same number in the first coordinate system while leaving S₂ and S₃ unchanged,

the method comprising:

(A) obtaining coordinates of the color S in a coordinate system other than the first coordinate system; and

(B) generating the coordinates of the color S in the first coordinate system.

Aspect 3 is a manufacture comprising one or more computer-readable and computer-executable computer instructions operable to cause a computer system to perform a method comprising image editing, the method comprising:

(1) obtaining digital data representing coordinates of a color S in a first coordinate system, wherein the color S has tristimulus values T₁, T₂, and T₃ in a second coordinate system, wherein the coordinates in the first coordinate system comprise coordinates S₁, S₂, S₃, or are a linear transformation of the coordinates S₁, S₂, S₃, wherein:

(A) the coordinate S₁ is defined by a value

$B = \sqrt{{g_{11}T_{1}^{2}} + {g_{22}T_{2}^{2}} + {g_{33}T_{3}^{2}} + {g_{12}T_{1}T_{2}} + {g_{13}T_{1}T_{3}} + {g_{23}T_{2}T_{3}}}$

wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ are predefined constants, and g₁₁, g₂₂, g₃₃ are not equal to zero, or

(B) the coordinate S₁ is defined by the value B and by a sign of a predefined function of one or more of T₁, T₂, T₃;

(2) obtaining data indicating a desired change in the value B;

(3) obtaining color coordinates in the first color coordinate system of a modified color whose coordinate S₁ incorporates a change in the value B without changing T₂/B and without changing T₃/B.

Aspect 4 is a manufacture as in aspect 3 wherein the operation (2) comprises obtaining a value k; and

the change is accomplished by multiplying the value B by the value k.

Aspect 5 is a manufacture comprising one or more computer-readable and computer-executable computer instructions operable to cause a computer system to perform a method comprising image editing, the method comprising:

(1) obtaining digital data representing coordinates of a color S in a first coordinate system, wherein the color S has tristimulus values T₁, T₂, and T₃ in a second coordinate system, wherein the coordinates in the first coordinate system comprise coordinates S₁, S₂, S₃, or are a linear transformation of the coordinates S₁, S₂, S₃, wherein S₁ is a non-linear function of one or more of T₁, T₂, T₃, wherein multiplication of all of the tristimulus values T₁, T₂, and T₃ by any number in the second coordinate system corresponds to multiplying the coordinate S₁ by the same number in the first coordinate system while leaving S₂ and S₃ unchanged;

(2) obtaining color coordinates in the first color coordinate system of a modified color by changing the coordinate S₁ of the color S without changing the coordinates S₂ and S₃.

Aspect 6 is a manufacture comprising one or more computer-readable and computer-executable computer instructions operable to cause a computer system to perform a method comprising image editing, the method comprising:

(1) obtaining digital data for image portions p₁, p₂, . . . , wherein for each image portion p (p=p₁, p₂, . . . ), the digital data represent coordinates of a color S(p) of the portion p in a first coordinate system, wherein for a color S having tristimulus values T₁, T₂, T₃ in a second coordinate system, the coordinates of the color S in the first coordinate system are coordinates S₁, S₂, S₃, or a linear transformation of the coordinates S₁, S₂, S₃, wherein:

(A) the coordinate S₁ is defined by a B value

$B = \sqrt{{g_{11}T_{1}^{2}} + {g_{22}T_{2}^{2}} + {g_{33}T_{3}^{2}} + {g_{12}T_{1}T_{2}} + {g_{13}T_{1}T_{3}} + {g_{23}T_{2}T_{3}}}$

wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ are predefined constants, and g₁₁, g₂₂, g₃₃ are not equal to zero, or

(B) the coordinate S₁ is defined by the B value and by a sign of a predefined function of one or more of T₁, T₂, T₃;

(2) for at least one image portion p_(i) which is one of p₁, p₂, . . . and whose respective color S(p_(i)) has tristimulus values T₁=T₁(p_(i)), T₂=T₂(p_(i)), T₃=T₃(p_(i)) in the second coordinate system and has a B value B(p_(i)), obtaining color coordinates in the first color coordinate system of a modified color S*(p_(i)) which has tristimulus values T₁=T₁*(p_(i)), T₂=T₂*(p_(i)), T₃=T₃*(p_(i)) in the second coordinate system and has a B value B*(p_(i)), such that:

${B^{*}\left( p_{i} \right)} = {{B_{avg}\left( p_{i} \right)} \times {f\left( \frac{B\left( p_{i} \right)}{B_{avg}\left( p_{i} \right)} \right)}}$

wherein:

f is a predefined strictly increasing non-identity function; and

B_(avg)(p_(i)) is a function of the B values of image portions in an image region R(p_(i)) containing a plurality of image portions including the portion p_(i).

Aspect 7 is a manufacture comprising one or more computer-readable and computer-executable computer instructions operable to cause a computer system to perform a method comprising image editing, the method comprising:

(1) obtaining digital data for image portions p₁, p₂, . . . , wherein for each image portion p (p=p₁, p₂, . . . ), the digital data represent a brightness B(p) of the portion p;

(2) for at least one image portion p_(i) which is one of p₁, p₂, . . . , obtaining a brightness B* of a modified image, such that:

${B^{*}\left( p_{i} \right)} = {{B_{avg}\left( p_{i} \right)} \times {f\left( \frac{B\left( p_{i} \right)}{B_{avg}\left( p_{i} \right)} \right)}}$

wherein:

f is a predefined strictly increasing non-identity function; and

B_(avg)(p_(i)) is a function of the brightness values B(p_(j)) of image portions p_(j) in an image region R(p_(i)) containing the portion p_(i).

Aspect 8 is a manufacture as in aspect 6 or 7 wherein

B^(*)(p_(i)) = B_(avg)^(1 − ɛ)(p_(i)) × B^(ɛ)(p_(i))

wherein ε is a positive constant other than 1, and B_(avg) is a weighted average of the brightness values of the image region R(p_(i)).

Aspect 9 is a manufacture comprising one or more computer-readable and computer-executable computer instructions operable to cause a computer system to perform a method comprising image editing, the method comprising:

(1) obtaining digital data representing image portions p₁, p₂, . . . , wherein for each image portion p (p=p₁, p₂, . . . ), the digital data define a brightness B(p) of the portion p;

(2) for each image portion p_(i) of a plurality of the image portions p₁, p₂, . . . , obtaining a brightness B*(p_(i)) of a modified image, such that:

B*(p _(i))=f(B(p _(i)),B _(avg)(p _(i)))

wherein:

B_(avg)(p_(i)) is a function of the brightness values B(p) of image portions p in an image region R(P containing a plurality of image portions including the portion p_(i); and

f is a predefined non-identity function such that for all i, the function f(B(p_(i)),y) is strictly monotonic in y for each B(pd, and for each B_(avg)(p_(i)), the function f(x,B_(avg)(p_(i))) is strictly increasing in x.

Aspect 10 is a manufacture as in aspect 9 wherein:

B*(p _(i))=B(p _(i))×(B ₀ /B _(avg)(p _(i)))^(ε)

where B₀ is a positive constant and ε is a non-zero constant.

Aspect 11 is a manufacture as in aspect 9 wherein for each image portion p (p=p₁, p₂, . . . ), the digital data represent a color S(p) of the portion p, the color S(p) having tristimulus values T₁(p), T₂(p), T₃(p) in a predefined color coordinate system, wherein for any color S having tristimulus values T₁, T₂, T₃ in said predefined color coordinate system and having a brightness B, for any positive value k in a range of positive values, a color with tristimulus values kT₁, kT₂, kT₃ has a brightness kB.

Aspect 12 is a manufacture as in aspect 11 wherein

$B = \sqrt{{g_{11}T_{1}^{2}} + {g_{22}T_{2}^{2}} + {g_{33}T_{3}^{2}} + {g_{12}T_{1}T_{2}} + {g_{13}T_{1}T_{3}} + {g_{23}T_{2}T_{3}}}$

wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ are predefined constants, and g₁₁, g₂₂, g₃₃ are not equal to zero.

Aspect 13 is a manufacture comprising one or more computer-readable and computer-executable computer instructions operable to cause a computer system to perform a method comprising image editing, the method comprising:

(1) obtaining digital data for image portions p₁, p₂, . . . , wherein for each image portion p (p=p₁, p₂, . . . ), the digital data represent coordinates of a color S(p) of the portion p in a first coordinate system, wherein for a color S having tristimulus values T₁, T₂, T₃ in a second coordinate system, the coordinates of the color S in the first coordinate system comprise coordinates S₁, S₂, S₃, or a linear transformation of the coordinates S₁, S₂, S₃, wherein:

(A) the coordinate S₁ is defined by a B value

$B = \sqrt{{g_{11}T_{1}^{2}} + {g_{22}T_{2}^{2}} + {g_{33}T_{3}^{2}} + {g_{12}T_{1}T_{2}} + {g_{13}T_{1}T_{3}} + {g_{23}T_{2}T_{3}}}$

wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ are predefined constants, and g₁₁, g₂₂, g₃₃ are not equal to zero, or

(B) the coordinate S₁ is defined by the B value and by a sign of a predefined function of one or more of T₁, T₂, T₃;

(2) for each image portion p (p=p₁, p₂, . . . ), obtaining color coordinates in the first color coordinate system of a modified color S*(p) whose coordinates S₂, S₃ are predefined constant values independent of the portion p.

Aspect 14 is a manufacture as in aspect 13 wherein for each image portion p (p=p₁, p₂, . . . ), the B value of the coordinate S₁ of the modified color S*(p) is equal to the B value of the coordinate S₁ of the color S(p).

Aspect 15 is a manufacture comprising one or more computer-readable and computer-executable computer instructions operable to cause a computer system to perform a method comprising image editing, the method comprising:

(1) obtaining digital data representing coordinates of a color S in a first coordinate system, wherein the color S has tristimulus values T₁, T₂, and T₃ in a second coordinate system, wherein the coordinates in the first coordinate system comprise coordinates S₁, S₂, S₃, or are a linear transformation of the coordinates S₁, S₂, S₃, wherein:

(A) the coordinate S₁ is defined by a value

$B = \sqrt{{g_{11}T_{1}^{2}} + {g_{22}T_{2}^{2}} + {g_{33}T_{3}^{2}} + {g_{12}T_{1}T_{2}} + {g_{13}T_{1}T_{3}} + {g_{23}T_{2}T_{3}}}$

wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ are predefined constants, and g₁₁, g₂₂, g₃₃ are not equal to zero, or

the coordinate S₁ is defined by the value B and by a sign of a predefined function of one or more of T₁, T₂, T₃;

(B) a value cos S₂ is defined by a value β(T₁,T₂,T₃)/B, wherein

β(T ₁ ,T ₂ ,T ₃)=β₁ ×T ₁+β₂ ×T ₂+β₃ ×T ₃,

wherein β₁, β₂, β₃ are predefined numbers at least one of which is not equal to zero, or

the value cos S₂ is defined by the value β(T₁,T₂,T₃)/B and the sign of said predefined function of one or more of T₁, T₂, T₃;

(C) a value tan S₃ is defined by a value γ(T₁,T₂,T₃)/δ(T₁,T₂,T₃), wherein

γ(T ₁ ,T ₂ ,T ₃)=γ₁ ×T ₁+γ₂ ×T ₂+γ₃ ×T ₃,

δ(T ₁ ,T ₂ ,T ₃)=δ₁ ×T ₁+δ₂ ×T ₂+δ₃ ×T ₃,

wherein γ₁, γ₂, γ₃ are predefined numbers at least one of which is not equal to zero, and δ₁, δ₂, δ₃ are predefined numbers at least one of which is not equal to zero, or

the value tan S₃ is defined by the value γ(T₁,T₂,T₃)/δ (T₁,T₂,T₃) and the sign of said predefined function of one or more of T₁, T₂, T₃;

(2) obtaining data indicating a desired change in one of the values S₂ or S₃;

(3) obtaining color coordinates in the first color coordinate system of a modified color whose coordinate S₂ incorporates said desired change but the coordinates S₁ and S₃ are unchanged, or whose coordinate S₃ incorporates said desired change but the coordinates S₁ and S₂ are unchanged.

Aspect 16 is a manufacture comprising one or more computer-readable and computer-executable computer instructions operable to cause a computer system to perform a method comprising image editing, the method comprising:

(1) obtaining digital data representing coordinates of a color S in a first coordinate system, wherein the color S has tristimulus values T₁, T₂, and T₃ in a second coordinate system, wherein the coordinates in the first coordinate system comprise coordinates S₁, S₂, S₃, or are a linear transformation of the coordinates S₁, S₂, S₃, wherein:

(A) the coordinate S₁ is defined by a value

$B = \sqrt{{g_{11}T_{1}^{2}} + {g_{22}T_{2}^{2}} + {g_{33}T_{3}^{2}} + {g_{12}T_{1}T_{2}} + {g_{13}T_{1}T_{3}} + {g_{23}T_{2}T_{3}}}$

wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ are predefined constants, and g₁₁, g₂₂, g₃₃ are not equal to zero, or

the coordinate S₁ is defined by the value B and by a sign of a predefined function of one or more of T₁, T₂, T₃;

(B) a value cos S₂ is defined by a value β(T₁,T₂,T₃)/B, wherein

β(T ₁ ,T ₂ ,T ₃)=β₁ ×T ₁+β₂ ×T ₂+β₃ ×T ₃,

wherein β₁, β₂, β₃ are predefined numbers at least one of which is not equal to zero, or

the value cos S₂ is defined by the value β(T₁,T₂,T₃)/B and the sign of said predefined function of one or more of T₁, T₂, T₃;

(C) a value tan S₃ is defined by a value γ(T₁,T₂,T₃)/δ(T₁,T₂,T₃), wherein

γ(T ₁ ,T ₂ ,T ₃)=γ₁ ×T ₁+γ₂ ×T ₂+γ₃ ×T ₃,

δ(T ₁ ,T ₂ ,T ₃)=δ₁ ×T ₁+δ₂ ×T ₂+δ₃ ×T ₃,

wherein γ₁, γ₂, γ₃ are predefined numbers at least one of which is not equal to zero, and δ₁, δ₂, δ₃ are predefined numbers at least one of which is not equal to zero, or

the value tan S₃ is defined by the value γ(T₁,T₂,T₃)/δ(T₁,T₂,T₃) and the sign of said predefined function of one or more of T₁, T₂, T₃;

(2) obtaining data indicating a desired change in the value S₃;

(3) obtaining color coordinates in the first color coordinate system of a modified color S* whose coordinate S₃ incorporates said desired change, the coordinate S₁ is unchanged, and the coordinate S₂ is either unchanged or is changed not to exceed a predefined function of the changed coordinate S₃.

Aspect 17 is a manufacture as in aspect 16 wherein the coordinate S₂ of the color S* is equal to the coordinate S₂ of the color S times the ratio of (i) a value of the predefined function for the coordinate S₂ of the color S* to (ii) a value of the predefined function for the coordinate S₂ of the color S.

Aspect 18 is a manufacture of any one as in aspects 6, 7, 9-12 wherein each image portion is a pixel, and the image region R(p_(i)) contains at most 30% of said pixels.

Aspect 19 is a manufacture of any one as in aspects 6, 7, 9-12 wherein B_(avg) is a weighted average of the B values of the image region R(p_(i)), and the sum of the weights is equal to 1.

Aspect 20 is a manufacture of any one as in aspects 1-6, 9-17 wherein:

$B = \sqrt{{\alpha_{1}^{2}\left( {T_{1},T_{2},T_{3}} \right)} + {\alpha_{2}^{2}\left( {T_{1},T_{2},T_{3}} \right)} + {\alpha_{3}^{2}\left( {T_{1},T_{2},T_{3}} \right)}}$ where α₁(T₁, T₂, T₃) = α₁₁ × T₁ + α₁₂ × T₂ + α₁₃ × T₃ α₂(T₁, T₂, T₃) = α₂₁ × T₁ + α₂₂ × T₂ + α₂₃ × T₃ α₃(T₁, T₂, T₃) = α₃₁ × T₁ + α₃₂ × T₂ + α₃₃ × T₃

wherein α₁₁, α₁₂, α₁₃, α₂₁, α₂₂, α₂₃, α₃₁, α₃₂, α₃₃ are predefined numbers such that the following matrix Λ is non-degenerate:

$\Lambda = \begin{bmatrix} \alpha_{11} & \alpha_{12} & \alpha_{13} \\ \alpha_{21} & \alpha_{22} & \alpha_{23} \\ \alpha_{31} & \alpha_{32} & \alpha_{33} \end{bmatrix}$

Aspect 21 is a manufacture as in aspect 20 wherein:

(C) the coordinate S₂ is defined by a value β(T₁,T₂,T₃)/B, wherein

β(T ₁ ,T ₂ ,T ₃)=β₁ ×T ₁+β₂ ×T ₂β₃ ×T ₃,

wherein β₁, β₂, β₃ are predefined numbers at least one of which is not equal to zero, or

the coordinate S₂ is defined by the value β(T₁,T₂,T₃)/B and the sign of said predefined function of one or more of T₁, T₂, T₃; and

(D) the coordinate S₃ is defined by a value γ(T₁, T₂,T₃)/B, wherein

γ(T ₁ ,T ₂ ,T ₃)=γ₁ ×T ₁+γ₂ ×T ₂+γ₃ ×T ₃,

wherein γ₁, γ₂, γ₃ are predefined numbers at least one of which is not equal to zero, and γ(T₁,T₂,T₃) is not a multiple of β(T₁,T₂,T₃), or

the coordinate S₃ is defined by the value γ(T₁,T₂,T₃)/B and the sign of said predefined function of one or more of T₁, T₂, T₃.

Aspect 22 is a manufacture as in aspect 21 wherein β(T₁,T₂,T₃) is one of α₁(T₁,T₂,T₃), α₂(T₁,T₂,T₃), α₃(T₁,T₂,T₃), and

γ(T₁,T₂,T₃) is another one of α₁(T₁,T₂,T₃), α₂(T₁,T₂,T₃), α₃(T₁,T₂,T₃).

Aspect 23 is a manufacture as in aspect 20 wherein:

(C) a value cos S₂ is defined by a value β(T₁,T₂,T₃)/B, wherein

β(T ₁ ,T ₂ ,T ₃)=β₁ ×T ₁+β₂ ×T ₂+β₃ ×T ₃,

wherein β₁, β₂, β₃ are predefined numbers at least one of which is not equal to zero, or

the value cos S₂ is defined by the value β(T₁,T₂,T₃)/B and the sign of said predefined function of one or more of T₁, T₂, T₃;

(D) a value tan S₃ is defined by a value γ(T₁,T₂,T₃)/δ(T₁,T₂,T₃), wherein

γ(T ₁ ,T ₂ ,T ₃)=γ₁ ×T ₁+γ₂ ×T ₂+γ₃ ×T ₃,

δ(T ₁ ,T ₂ ,T ₃)=δ₁ ×T ₁+δ₂ ×T ₂+δ₃ ×T ₃,

wherein γ₁, γ₂, γ₃ are predefined numbers at least one of which is not equal to zero, and δ₁, δ₂, δ₃ are predefined numbers at least one of which is not equal to zero, or

the value tan S₃ is defined by the value γ(T₁,T₂,T₃)/δ(T₁,T₂,T₃) and the sign of said predefined function of one or more of T₁, T₂, T₃.

Aspect 24 is a manufacture as in aspect 23 wherein β(T₁,T₂,T₃)=α₁(T₁,T₂,T₃);

γ(T₁,T₂,T₃) is one of α₂(T₁,T₂,T₃), α₃(T₁,T₂,T₃); and

δ(T₁,T₂,T₃) is the other one of α₂(T₁,T₂,T₃), α₃(T₁,T₂,T₃).

Aspect 25 is a manufacture as in aspect 20 wherein α₁(T₁,T₂,T₃), α₂(T₁,T₂,T₃), α₃(T₁,T₂,T₃) are tristimulus values corresponding to 70%-orthonormal color matching functions.

Aspect 26 is a manufacture as in aspect 25 wherein:

the value T₁ is one of values D, E, F, the value T₂ is another one of D, E, F, and the value T₃ is the third one of D, E, F, where

$\begin{bmatrix} D \\ E \\ F \end{bmatrix} = {A\begin{bmatrix} X \\ Y \\ Z \end{bmatrix}}$

where the matrix A has elements which, up to rounding, are as follows:

$A = \begin{bmatrix} 0.205306 & 0.712507` & 0.467031 \\ {- 0.365451} & 1.011998 & {- 0.610425} \\ 1.853667 & {- 1.279659} & {- 0.442859} \end{bmatrix}$

where X, Y, Z are the coordinates of the color S in the CIE 1931 XYZ color coordinate system for a 2° field;

wherein up to a constant multiple, Λ is a 70%-orthonormal matrix.

Aspect 27 is a manufacture comprising computer-readable digital data representing coordinates of a color S in a first coordinate system, wherein the color S has tristimulus values T₁, T₂, and T₃ in a second coordinate system, wherein the coordinates in the first coordinate system comprise coordinates S₁, S₂, S₃, or are a linear transformation of the coordinates S₁, S₂, S₃, wherein:

(A) the coordinate S₁ is defined by a value

$B = \sqrt{{g_{11}T_{1}^{2}} + {g_{22}T_{2}^{2}} + {g_{33}T_{3}^{2}} + {g_{12}T_{1}T_{2}} + {g_{13}T_{1}T_{3}} + {g_{23}T_{2}T_{3}}}$

wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ are predefined constants, and g₁₁, g₂₂, g₃₃ are not equal to zero, or

(B) the coordinate S₁ is defined by the value B and by a sign of a predefined function of one or more of T₁, T₂, T₃.

Aspect 28 is a manufacture comprising computer-readable digital data representing coordinates of a color S in a first coordinate system, wherein the color S has tristimulus values T₁, T₂, and T₃ in a second coordinate system, wherein the coordinates in the first coordinate system comprise coordinates S₁, S₂, S₃, or are a linear transformation of the coordinates S₁, S₂, S₃, wherein S₁ is a non-linear function of one or more of T₁, T₂, T₃, wherein multiplication of all of the tristimulus values T₁, T₂, and T₃ by any number in the second coordinate system corresponds to multiplying the coordinate S₁ by the same number in the first coordinate system while leaving S₂ and S₃ unchanged.

Aspect 29 is a manufacture comprising computer-readable and computer-executable computer instructions operable to cause a computer system to perform a method comprising generating and/or editing digital data representing coordinates of a color S in a first coordinate system, wherein the color S has tristimulus values T₁, T₂, and T₃ in a second coordinate system, wherein the coordinates in the first coordinate system comprise coordinates S₁, S₂, S₃, or are a linear transformation of the coordinates S₁, S₂, S₃, wherein:

(A) the coordinate S₁ is defined by a value

$B = \sqrt{{g_{11}T_{1}^{2}} + {g_{22}T_{2}^{2}} + {g_{33}T_{3}^{2}} + {g_{12}T_{1}T_{2}} + {g_{13}T_{1}T_{3}} + {g_{23}T_{2}T_{3}}}$

wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ are predefined constants, and g₁₁, g₂₂, g₃₃ are not equal to zero, or

(B) the coordinate S₁ is defined by the value B and by a sign of a predefined function of one or more of T₁, T₂, T₃.

Aspect 30 is a manufacture as in aspect 29 wherein generating and/or editing the digital data comprises:

obtaining coordinates of the color S in a coordinate system other than the first coordinate system; and

generating the value B and/or the coordinate S₁ and/or the linear transform of the coordinates S₁, S₂, S₃ from the coordinates of the color S in said coordinate system other than the first coordinate system.

Aspect 31 is a manufacture as in aspect 29 wherein generating and/or editing digital data comprises:

obtaining data indicating a desired change in the value B;

obtaining color coordinates in the first color coordinate system of a modified color whose coordinate S₁ incorporates a change in the value B without changing T₂/B and without changing T₃/B.

Aspect 32 is a manufacture as in aspect 29 wherein the image comprises image portions p₁, p₂, . . . , wherein for each image portion p (p=p₁, p₂, . . . ), and the digital data represent coordinates of a color S(p) of the portion p in the first coordinate system;

wherein generating and/or editing the digital data comprises, for at least one image portion p_(i) which is one of p₁, p₂, . . . and whose respective color S(p_(i)) has tristimulus values T₁=T₁(P), T₂=T₂(p_(i)), T₃=T₃(p_(i)) in the second coordinate system and has a B value B(pd), obtaining color coordinates in the first color coordinate system of a modified color S*(pd which has tristimulus values T₁=T₁*(p_(i)), T₂=T₂*(p_(i)), T₃=T₃*(p_(i)) in the second coordinate system and has a B value B* (p_(i)), such that:

${B^{*}\left( p_{i} \right)} = {{B_{avg}\left( p_{i} \right)} \times {f\left( \frac{B\left( p_{i} \right)}{B_{avg}\left( p_{i} \right)} \right)}}$

wherein:

f is a predefined strictly increasing non-identity function; and

B_(avg)(p_(i)) is a function of the B values of image portions in an image region R(p_(i)) containing a plurality of image portions including the portion p_(i).

Aspect 33 is a manufacture comprising computer-readable and computer-executable computer instructions operable to cause a computer system to perform a method comprising image editing, the method comprising:

(1) obtaining digital data for image portions p₁, p₂, . . . , wherein for each image portion p (p=p₁, p₂, . . . ), the digital data represent a brightness B(p) of the portion p;

(2) for at least one image portion p_(i) which is one of p₁, p₂, . . . , obtaining a brightness B* of a modified image, such that:

${B^{*}\left( p_{i} \right)} = {{B_{avg}\left( p_{i} \right)} \times {f\left( \frac{B\left( p_{i} \right)}{B_{avg}\left( p_{i} \right)} \right)}}$

wherein:

f is a predefined strictly increasing non-identity function; and

B_(avg)(p_(i)) is a function of the brightness values B(p_(j)) of image portions p_(j) in an image region R(p_(i)) containing the portion p_(i).

Aspect 34 is a manufacture as in aspect 32 or 33 wherein

B*(p _(i))=B _(avg) ^(1-ε)(p _(i))×B ^(ε)(p _(i))

wherein ε is a positive constant other than 1, and B_(avg) is a weighted average of the brightness values of the image region R(p_(i)).

Aspect 35 is a manufacture comprising computer-readable and computer-executable computer instructions operable to cause a computer system to perform a method comprising image editing, the method comprising:

(1) obtaining digital data representing image portions p₁, p₂, . . . , wherein for each image portion p (p=p₁, p₂, . . . ), the digital data define a brightness B(p) of the portion p;

(2) for each image portion p_(i) of a plurality of the image portions p₁, p₂, obtaining a brightness B*(p_(i)) of a modified image, such that:

B*(p _(i))=f(B(p _(i)),B _(avg)(p _(i)))

wherein:

B_(avg)(p_(i)) is a function of the brightness values B(p) of image portions p in an image region R(p_(i)) containing a plurality of image portions including the portion p_(i); and

f is a predefined non-identity function such that for all i, the function f(B(p_(i)),y) is strictly monotonic in y for each B(p_(i)), and for each B_(avg)(p_(i)), the function f(x,B_(avg)(p_(i))) is strictly increasing in x.

Aspect 36 is a manufacture as in aspect 35 wherein:

B*(p _(i))=B(p _(i))×(B ₀ /B _(avg)(p _(i)))^(ε)

where B₀ is a positive constant and ε is a non-zero constant.

Aspect 37 is a manufacture as in aspect 35 wherein for each image portion p (p═p₁, p₂, . . . ), the digital data represent a color S(p) of the portion p, the color S(p) having tristimulus values T₁(p), T₂(p), T₃(p) in a predefined color coordinate system, wherein for any color S having tristimulus values T₁, T₂, T₃ in said predefined color coordinate system and having a brightness B, for any positive value k in a range of positive values, a color with tristimulus values kT₁, kT₂, kT₃ has a brightness kB.

Aspect 38 is a manufacture as in aspect 37 wherein

$B = \sqrt{{g_{11}T_{1}^{2}} + {g_{22}T_{2}^{2}} + {g_{33}T_{3}^{2}} + {g_{12}T_{1}T_{2}} + {g_{13}T_{1}T_{3}} + {g_{23}T_{2}T_{3}}}$

wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ are predefined constants, and g₁₁, g₂₂, g₃₃ are not equal to zero.

Aspect 39 is a manufacture as in aspect 29 wherein the image comprises image portions p₁,p₂, . . . , wherein for each image portion p (p=p₁, p₂, . . . ), the digital data represent coordinates of a color S(p) of the portion p in the first coordinate system;

wherein generating and/or editing the digital data comprises, for each image portion p (p=p₁, p₂, . . . ), obtaining color coordinates in the first color coordinate system of a modified color S*(p) whose coordinates S₂, S₃ are predefined constant values independent of the portion p.

Aspect 40 is a manufacture as in aspect 39 wherein for each image portion p (p=p₁, p₂, . . . ), the B value of the coordinate S₁ of the modified color S*(p) is equal to the B value of the coordinate S₁ of the color S(p).

Aspect 41 is a manufacture as in aspect 29 wherein:

(C) a value cos S₂ is defined by a value β(T₁,T₂,T₃)/B, wherein

β(T ₁ ,T ₂ ,T ₃)=β₁ ×T ₁+β₂ ×T ₂+β₃ ×T ₃,

wherein β₁, β₂, β₃ are predefined numbers at least one of which is not equal to zero, or

the value cos S₂ is defined by the value β(T₁,T₂,T₃)/B and the sign of said predefined function of one or more of T₁, T₂, T₃;

(D) a value tan S₃ is defined by a value γ(T₁,T₂,T₃)/δ(T₁,T₂,T₃), wherein

γ(T ₁ ,T ₂ ,T ₃)=γ₁ ×T ₁+γ₂ ×T ₂+γ₃ ×T ₃,

δ(T ₁ ,T ₂ ,T ₃)=δ₁ ×T ₁+δ₂ ×T ₂+δ₃ ×T ₃,

wherein γ₁, γ₂, γ₃ are predefined numbers at least one of which is not equal to zero, and δ₁, δ₂, δ₃ are predefined numbers at least one of which is not equal to zero, or

the value tan S₃ is defined by the value γ(T₁,T₂,T₃)/δ(T₁,T₂,T₃) and the sign of said predefined function of one or more of T₁, T₂, T₃;

wherein generating and/or editing the digital data comprises:

obtaining data indicating a desired change in one of the values S₂ or S₃;

obtaining color coordinates in the first color coordinate system of a modified color whose coordinate S₂ incorporates said desired change but the coordinates S₁ and S₃ are unchanged, or whose coordinate S₃ incorporates said desired change but the coordinates S₁ and S₂ are unchanged.

Aspect 42 is a manufacture as in aspect 29 wherein:

(C) a value cos S₂ is defined by a value β(T₁,T₂,T₃)/B, wherein

β(T ₁ ,T ₂ ,T ₃)=β₁ ×T ₁+β₂ ×T ₂+β₃ ×T ₃,

wherein β₁, β₂, β₃ are predefined numbers at least one of which is not equal to zero, or

the value cos S₂ is defined by the value β(T₁,T₂,T₃)/B and the sign of said predefined function of one or more of T₁, T₂, T₃;

(D) a value tan S₃ is defined by a value γ(T₁,T₂,T₃)/δ(T₁,T₂,T₃), wherein

γ(T ₁ ,T ₂ ,T ₃)=γ₁ ×T ₁+γ₂ ×T ₂+γ₃ ×T ₃,

δ(T ₁ ,T ₂ ,T ₃)=δ₁ ×T ₁+δ₂ ×T ₂+δ₃ ×T ₃,

wherein γ₁, γ₂, γ₃ are predefined numbers at least one of which is not equal to zero, and δ₁, δ₂, δ₃ are predefined numbers at least one of which is not equal to zero, or

the value tan S₃ is defined by the value γ(T₁,T₂,T₃)/δ(T₁,T₂,T₃) and the sign of said predefined function of one or more of T₁, T₂, T₃;

wherein generating and/or editing the digital data comprises:

obtaining data indicating a desired change in the value S₃;

obtaining color coordinates in the first color coordinate system of a modified color S* whose coordinate S₃ incorporates said desired change, the coordinate S₁ is unchanged, and the coordinate S₂ is either unchanged or is changed not to exceed a predefined function of the changed coordinate S₃.

Aspect 43 is a manufacture as in aspect 42 wherein the coordinate S₂ of the color S* is equal to the coordinate S₂ of the color S times the ratio of (i) a value of the predefined function for the coordinate S₂ of the color S* to (ii) a value of the predefined function for the coordinate S₂ of the color S.

Aspect 44 is a manufacture of any one as in aspects 32, 33, 35-38 wherein each image portion is a pixel, and the image region R(p_(i)) contains at most 30% of said pixels.

Aspect 45 is a manufacture of any one as in aspects 32, 33, 35-38 wherein B_(avg) is a weighted average of the B values of the image region R(p_(i)), and the sum of the weights is equal to 1.

Aspect 46 is a manufacture of any one as in aspects 29-32, 35-43 wherein:

$B = \sqrt{{\alpha_{1}^{2}\left( {T_{1},T_{2},T_{3}} \right)} + {\alpha_{2}^{2}\left( {T_{1},T_{2},T_{3}} \right)} + {\alpha_{3}^{2}\left( {T_{1},T_{2},T_{3}} \right)}}$ wherein α₁(T₁, T₂, T₃) = α₁₁ × T₁ + α₁₂ × T₂ + α₁₃ × T₃ α₂(T₁, T₂, T₃) = α₂₁ × T₁ + α₂₂ × T₂ + α₂₃ × T₃ α₃(T₁, T₂, T₃) = α₃₁ × T₁ + α₃₂ × T₂ + α₃₃ × T₃

wherein α₁₁, α₁₂, α₁₃, α₂₁, α₂₂, α₂₃, α₃₁, α₃₂, α₃₃ are predefined numbers such that the following matrix Λ is non-degenerate:

$\Lambda = \begin{bmatrix} \alpha_{11} & \alpha_{12} & \alpha_{13} \\ \alpha_{21} & \alpha_{22} & \alpha_{23} \\ \alpha_{31} & \alpha_{32} & \alpha_{33} \end{bmatrix}$

Aspect 47 is a manufacture as in aspect 46 wherein:

(C) the coordinate S₂ is defined by a value β(T₁,T₂,T₃)/B, wherein

β(T ₁ ,T ₂ ,T ₃)=β₁ ×T ₁+β₂ ×T ₂+β₃ ×T ₃,

wherein β₁, β₂, β₃ are predefined numbers at least one of which is not equal to zero, or

the coordinate S₂ is defined by the value β(T₁,T₂,T₃)/B and the sign of said predefined function of one or more of T₁, T₂, T₃; and

(D) the coordinate S₃ is defined by a value γ(T₁,T₂,T₃)/B, wherein

γ(T ₁ ,T ₂ ,T ₃)=γ₁ ×T ₁+γ₂ ×T ₂+γ₃ ×T ₃,

wherein γ₁, γ₂, γ₃ are predefined numbers at least one of which is not equal to zero, and γ(T₁,T₂,T₃) is not a multiple of β(T₁,T₂,T₃), or

the coordinate S₃ is defined by the value γ(T₁,T₂,T₃)/B and the sign of said predefined function of one or more of T₁, T₂, T₃.

Aspect 48 is a manufacture as in aspect 47 wherein β(T₁,T₂,T₃) is one of α₁(T₁,T₂,T₃), α₂(T₁,T₂,T₃), α₃(T₁,T₂,T₃), and

γ(T₁,T₂,T₃) is another one of α₁(T₁,T₂,T₃), α₂(T₁,T₂,T₃), α₃(T₁,T₂,T₃).

Aspect 49 is a manufacture as in aspect 46 wherein:

(C) a value cos S₂ is defined by a value β(T₁,T₂,T₃)/B, wherein

β(T ₁ ,T ₂ ,T ₃)=β₁ ×T ₁+β₂ ×T ₂+β₃ ×T ₃,

wherein β₁, β₂, β₃ are predefined numbers at least one of which is not equal to zero, or

the value cos S₂ is defined by the value β(T₁,T₂,T₃)/B and the sign of said predefined function of one or more of T₁, T₂, T₃;

(D) a value tan S₃ is defined by a value γ(T₁,T₂,T₃)/δ(T₁,T₂,T₃), wherein

γ(T ₁ ,T ₂ ,T ₃)=γ₁ ×T ₁+γ₂ ×T ₂+γ₃ ×T ₃,

δ(T ₁ ,T ₂ ,T ₃)=δ₁ ×T ₁+δ₂ ×T ₂+δ₃ ×T ₃,

wherein γ₁, γ₂, γ₃ are predefined numbers at least one of which is not equal to zero, and δ₁, δ₂, δ₃ are predefined numbers at least one of which is not equal to zero, or

the value tan S₃ is defined by the value γ(T₁,T₂,T₃)/δ(T₁,T₂,T₃) and the sign of said predefined function of one or more of T₁, T₂, T₃.

Aspect 50 is a manufacture as in aspect 49 wherein β(T₁,T₂,T₃)=α₁(T₁,T₂,T₃);

γ(T₁,T₂,T₃) is one of α₂(T₁,T₂,T₃), α₃(T₁,T₂,T₃); and

δ(T₁,T₂,T₃) is the other one of α₂(T₁,T₂,T₃), α₃(T₁,T₂,T₃).

Aspect 51 is a manufacture as in aspect 46 wherein α₁(T₁,T₂,T₃), α₂(T₁,T₂,T₃), α₃(T₁,T₂,T₃) are tristimulus values corresponding to 70%-orthonormal color matching functions.

Aspect 52 is a manufacture as in aspect 51 wherein:

the value T₁ is one of values D, E, F, the value T₂ is another one of D, E, F, and the value T₃ is the third one of D, E, F, where

$\begin{bmatrix} D \\ E \\ F \end{bmatrix} = {A\begin{bmatrix} X \\ Y \\ Z \end{bmatrix}}$

where the matrix A has elements which, up to rounding, are as follows:

$A = \begin{bmatrix} 0.205306 & 0.712507 & 0.467031 \\ {- 0.365451} & 1.011998 & {- 0.610425} \\ 1.853667 & {- 1.279659} & {- 0.442859} \end{bmatrix}$

where X, Y, Z are the coordinates of the color S in the CIE 1931 XYZ color coordinate system for a 2° field;

wherein up to a constant multiple, Λ is a 70%-orthonormal matrix.

APPENDIX 1 Function arctg(a,b)

Here is a pseudocode written in a C-like language (C is a programming language). inline float arctg(const float a, const float b)

{ float res; if( FLT_EPSILON * abs(b) < abs(a) ) //FLT_EPSILON is the minimum positive number ε // such that 1−ε is different from 1 on the computer. //abs( ) is the absolute value { res = tan⁻¹ (b / a) ; if (a < 0) { res += π ; } else if (b < 0) { res += 2 π ; }; } else { if(b < 0) { res = 3/2 π ; } else { if (b > 0) { res = ½ π ; } else { res = 0 ; }; }; }; return res ; } ;

APPENDIX 2 Calculation of Means B_(avg)(p_(i)) for rectangular regions R(p_(i))

void CalculatePartialSum( float *pB, //InOut int nLenght, //In int nRadius //In ) { float *Temp = new float [nLenght + 2 * nRadius] ; int offset = nRadius ; for (int i = 0; i < nLenght; ++i) { Temp[offset++] = pB[i] ; } ; int iLeft = nRadius ; int iRight = nLenght −2 ; for (i = 0; i < nRadius; ++i) { Temp[i] = pB[iLeft−−] ; Temp[offset++] =pB[iRight−−] ; } ; iLeft = 0; iRight = 2* nRadius +1; float Sum = Temp[0] ; for (i = 1; i < iRight; ++i) { Sum += Temp[i] ; } ; pB[0] = Sum; for (i = 1; i < nLenght; ++i) { Sum += Temp[iRight++] − Temp[iLeft++] ; pB[i] = Sum; } return; } ; void CalculateMeanBrightness( float *pMeanB, //Out image *pImage, //In int nWidth, //In int nHeight, //In int nRadiusWidth, //In int nRadiusHeight //In ) { int length = nWidth * nHeight ; for(int offset = 0; offset < length; ++offset) { pMeanB[offset] = Brightness(pImage[offset]) ; } ; offset = 0; for(int y = 0; y < nHeight; ++y) { CalculatePartialSum( pMeanB+offset, nWidth, nRadius Width ) ; offset += nWidth ; }; float *Temp = new float[nHeight] ; float kNorm = 1. / (2 * nRadiusWidth + 1) / (2 * nRadiusHeight + 1) ; for(int x = 0; x < nWidth; ++x) { offset = x ; for(int y = 0; y < nHeight; ++y) { Temp[y] = pMeanB[offset] ; offset += nWidth ; } ; CalculatePartialSum( Temp, nHeight, nRadiusHeight ) ; offset = x ; for(y = 0; y < nHeight; ++y) { pMeanB[offset] = Temp[y] * kNorm ; offset += nWidth ; } ; } ; return ; } ; 

1. A manufacture comprising computer-readable and computer-executable computer instructions operable to cause a computer system to perform a method comprising generating and/or editing digital data representing coordinates of a color S in a first coordinate system, wherein the color S has tristimulus values T₁, T₂, and T₃ in a second coordinate system, wherein the coordinates in the first coordinate system comprise coordinates S₁, S₂, S₃, or are a linear transformation of the coordinates S₁, S₂, S₃, wherein: (A) the coordinate S₁ is defined by a value $B = \sqrt{{g_{11}T_{1}^{2}} + {g_{22}T_{2}^{2}} + {g_{33}T_{3}^{2}} + {g_{12}T_{1}T_{2}} + {g_{13}T_{1}T_{3}} + {g_{23}T_{2}T_{3}}}$ wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ are predefined constants, and g₁₁, g₂₂, g₃₃ are not equal to zero, or (B) the coordinate S₁ is defined by the value B and by a sign of a predefined function of one or more of T₁, T₂, T₃.
 2. The manufacture of claim 1 wherein generating and/or editing the digital data comprises: obtaining coordinates of the color S in a coordinate system other than the first coordinate system; and generating the value B and/or the coordinate S₁ and/or the linear transform of the coordinates S₁, S₂, S₃ from the coordinates of the color S in said coordinate system other than the first coordinate system.
 3. The manufacture of claim 1 wherein generating and/or editing digital data comprises: obtaining data indicating a desired change in the value B; obtaining color coordinates in the first color coordinate system of a modified color whose coordinate S₁ incorporates a change in the value B without changing T₂/B and without changing T₃/B.
 4. The manufacture of claim 1 wherein the image comprises image portions p₁, p₂, . . . , wherein for each image portion p (p=p₁, p₂, . . . ), and the digital data represent coordinates of a color S(p) of the portion p in the first coordinate system; wherein generating and/or editing the digital data comprises, for at least one image portion p_(i) which is one of p₁, p₂, . . . and whose respective color S(p_(i)) has tristimulus values T₁=T₁(p_(i)), T₂=T₂(p_(i)), T₃=T₃(p_(j)) in the second coordinate system and has a B value B(p_(i)), obtaining color coordinates in the first color coordinate system of a modified color S*(p_(i)) which has tristimulus values T₁=T₁*(p_(i)), T₂=T₂* (p_(i)), T₃=T₃*(p_(i)) in the second coordinate system and has a B value B* (p_(i)), such that: ${B^{*}\left( p_{i} \right)} = {{B_{avg}\left( p_{i} \right)} \times {f\left( \frac{B\left( p_{i} \right)}{B_{avg}\left( p_{i} \right)} \right)}}$ wherein: f is a predefined strictly increasing non-identity function; and B_(avg)(p_(i)) is a function of the B values of image portions in an image region R(p_(i)) containing a plurality of image portions including the portion p_(i).
 5. The manufacture of claim 4 wherein B^(*)(p_(i)) = B_(avg)^(1 − ɛ)(p_(i)) × B^(ɛ)(p_(i)) wherein ε is a positive constant other than 1, and B_(avg) is a weighted average of the brightness values of the image region R(p_(i)).
 6. The manufacture of claim 4 wherein each image portion is a pixel, and the image region R(p_(i)) contains at most 30% of said pixels.
 7. The manufacture of claim 4 wherein B_(avg) is a weighted average of the B values of the image region R(p_(i)), and the sum of the weights is equal to
 1. 8. The manufacture of claim 1 wherein: (C) a value cos S₂ is defined by a value β(T₁,T₂,T₃)/B, wherein β(T ₁ ,T ₂ ,T ₃)=β₁ ×T ₁+β₂ ×T ₂+β₃ ×T ₃, wherein β₁, β₂, β₃ are predefined numbers at least one of which is not equal to zero, or the value cos S₂ is defined by the value β(T₁,T₂,T₃)/B and the sign of said predefined function of one or more of T₁, T₂, T₃; (D) a value tan S₃ is defined by a value γ(T₁,T₂,T₃)/β(T₁,T₂,T₃), wherein γ(T ₁ ,T ₂ ,T ₃)=γ₁ ×T ₁+γ₂ ×T ₂+γ₃ ×T ₃, δ(T ₁ ,T ₂ ,T ₃)=δ₁ ×T ₁+δ₂ ×T ₂+δ₃ ×T ₃, wherein γ₁, γ₂, γ₃ are predefined numbers at least one of which is not equal to zero, and δ₁, δ₂, δ₃ are predefined numbers at least one of which is not equal to zero, or the value tan S₃ is defined by the value γ(T₁,T₂,T₃)/δ(T₁,T₂,T₃) and the sign of said predefined function of one or more of T₁, T₂, T₃; wherein generating and/or editing the digital data comprises: obtaining data indicating a desired change in one of the values S₂ or S₃; obtaining color coordinates in the first color coordinate system of a modified color whose coordinate S₂ incorporates said desired change but the coordinates S₁ and S₃ are unchanged, or whose coordinate S₃ incorporates said desired change but the coordinates S₁ and S₂ are unchanged.
 9. The manufacture of claim 1 wherein: (C) a value cos S₂ is defined by a value β(T₁,T₂,T₃)/B, wherein β(T ₁ ,T ₂ ,T ₃)=β₁ ×T ₁+β₂ ×T ₂+β₃ ×T ₃, wherein β₁, β₂, β₃ are predefined numbers at least one of which is not equal to zero, or the value cos S₂ is defined by the value β(T₁,T₂,T₃)/B and the sign of said predefined function of one or more of T₁, T₂, T₃; (D) a value tan S₃ is defined by a value γ(T₁,T₂,T₃)/δ(T₁,T₂,T₃), wherein γ(T ₁ ,T ₂ ,T ₃)=γ₁ ×T ₁+γ₂ ×T ₂+γ₃ ×T ₃, δ(T ₁ ,T ₂ ,T ₃)=δ₁ ×T ₁+δ₂ ×T ₂+δ₃ ×T ₃, wherein γ₁, γ₂, γ₃ are predefined numbers at least one of which is not equal to zero, and δ₁, δ₂, δ₃ are predefined numbers at least one of which is not equal to zero, or the value tan S₃ is defined by the value γ(T₁,T₂,T₃)/δ(T₁,T₂,T₃) and the sign of said predefined function of one or more of T₁, T₂, T₃; wherein generating and/or editing the digital data comprises: obtaining data indicating a desired change in the value S₃; obtaining color coordinates in the first color coordinate system of a modified color S* whose coordinate S₃ incorporates said desired change, the coordinate S₁ is unchanged, and the coordinate S₂ is either unchanged or is changed not to exceed a predefined function of the changed coordinate S₃.
 10. The manufacture of claim 9 wherein the coordinate S₂ of the color S* is equal to the coordinate S₂ of the color S times the ratio of (i) a value of the predefined function for the coordinate S₂ of the color S* to (ii) a value of the predefined function for the coordinate S₂ of the color S.
 11. The manufacture of claim 1 wherein: $B = \sqrt{{\alpha_{1}^{2}\left( {T_{1},T_{2},T_{3}} \right)} + {\alpha_{2}^{2}\left( {T_{1},T_{2},T_{3}} \right)} + {\alpha_{3}^{2}\left( {T_{1},T_{2},T_{3}} \right)}}$ wherein α₁(T₁, T₂, T₃) = α₁₁ × T₁ + α₁₂ × T₂ + α₁₃ × T₃ α₂(T₁, T₂, T₃) = α₂₁ × T₁ + α₂₂ × T₂ + α₂₃ × T₃ α₃(T₁, T₂, T₃) = α₃₁ × T₁ + α₃₂ × T₂ + α₃₃ × T₃ wherein α₁₁, α₁₂, α₁₃, α₂₁, α₂₂, α₂₃, α₃₁, α₃₂, α₃₃ are predefined numbers such that the following matrix Λ is non-degenerate: $\Lambda = \begin{bmatrix} \alpha_{11} & \alpha_{12} & \alpha_{13} \\ \alpha_{21} & \alpha_{22} & \alpha_{23} \\ \alpha_{31} & \alpha_{32} & \alpha_{33} \end{bmatrix}$
 12. The manufacture of claim 11 wherein: (C) the coordinate S₂ is defined by a value β(T₁,T₂,T₃)/B, wherein β(T ₁ ,T ₂ ,T ₃)=β₁ ×T ₁+β₂ ×T ₂+β₃ ×T ₃, wherein β₁, β₂, β₃ are predefined numbers at least one of which is not equal to zero, or the coordinate S₂ is defined by the value β(T₁,T₂,T₃)/B and the sign of said predefined function of one or more of T₁, T₂, T₃; and (D) the coordinate S₃ is defined by a value γ(T₁,T₂,T₃)/B, wherein γ(T ₁ ,T ₂ ,T ₃)=γ₁ ×T ₁+γ₂ ×T ₂+γ₃ ×T ₃, wherein γ₁, γ₂, γ₃ are predefined numbers at least one of which is not equal to zero, and γ(T₁,T₂,T₃) is not a multiple of β(T₁,T₂,T₃), or the coordinate S₃ is defined by the value γ(T₁,T₂,T₃)/B and the sign of said predefined function of one or more of T₁, T₂, T₃.
 13. The manufacture of claim 12 wherein β(T₁,T₂,T₃) is one of α₁(T₁,T₂,T₃), α₂(T₁,T₂,T₃), α₃(T₁,T₂,T₃), and γ(T₁,T₂,T₃) is another one of α₁(T₁,T₂,T₃), α₂(T₁,T₂,T₃), α₃(T₁,T₂,T₃).
 14. The manufacture of claim 11 wherein: (C) a value cos S₂ is defined by a value β(T₁,T₂,T₃)/B, wherein β(T ₁ ,T ₂ ,T ₃)=β₁ ×T ₁+β₂ ×T ₂+β₃ ×T ₃, wherein β₁, β₂, β₃ are predefined numbers at least one of which is not equal to zero, or the value cos S₂ is defined by the value β(T₁,T₂,T₃)/B and the sign of said predefined function of one or more of T₁, T₂, T₃; (D) a value tan S₃ is defined by a value γ(T₁,T₂,T₃)/δ(T₁,T₂,T₃), wherein γ(T ₁ ,T ₂ ,T ₃)=γ₁ ×T ₁+γ₂ ×T ₂+γ₃ ×T ₃, δ(T ₁ ,T ₂ ,T ₃)=δ₁ ×T ₁+δ₂ ×T ₂+δ₃ ×T ₃, wherein γ₁, γ₂, γ₃ are predefined numbers at least one of which is not equal to zero, and δ₁, δ₂, δ₃ are predefined numbers at least one of which is not equal to zero, or the value tan S₃ is defined by the value γ(T₁,T₂,T₃)/δ(T₁,T₂,T₃) and the sign of said predefined function of one or more of T₁, T₂, T₃.
 15. The manufacture of claim 14 wherein β(T₁,T₂,T₃)=α₁(T₁,T₂,T₃); γ(T₁,T₂,T₃) is one of α₂(T₁,T₂,T₃), α₃(T₁,T₂,T₃); and δ(T₁,T₂,T₃) is the other one of α₂(T₁,T₂,T₃), α₃(T₁,T₂,T₃).
 16. The manufacture of claim 11 wherein α₁(T₁,T₂,T₃), α₂(T₁,T₂,T₃), α₃(T₁,T₂,T₃) are tristimulus values corresponding to 70%-orthonormal color matching functions.
 17. The manufacture of claim 16 wherein: the value T₁ is one of values D, E, F, the value T₂ is another one of D, E, F, and the value T₃ is the third one of D, E, F, where $\begin{bmatrix} D \\ E \\ F \end{bmatrix} = {A\begin{bmatrix} X \\ Y \\ Z \end{bmatrix}}$ where the matrix A has elements which, up to rounding, are as follows: $A = \begin{bmatrix} 0.205306 & 0.712507 & 0.467031 \\ {- 0.365451} & 1.011998 & {- 0.610425} \\ 1.853667 & {- 1.279659} & {- 0.442859} \end{bmatrix}$ where X, Y, Z are the coordinates of the color S in the CIE 1931 XYZ color coordinate system for a 2° field; wherein up to a constant multiple, Λ is a 70%-orthonormal matrix.
 18. A manufacture comprising computer-readable and computer-executable computer instructions operable to cause a computer system to perform a method comprising image editing, the method comprising: (1) obtaining digital data for image portions p₁, p₂, . . . , wherein for each image portion p (p=p₁, p₂, . . . ), the digital data represent a brightness B(p) of the portion p; (2) for at least one image portion p_(i) which is one of p₁, p₂, . . . , obtaining a brightness B* of a modified image, such that: ${B^{*}\left( p_{i} \right)} = {{B_{avg}\left( p_{i} \right)} \times {f\left( \frac{B\left( p_{i} \right)}{B_{avg}\left( p_{i} \right)} \right)}}$ wherein: f is a predefined strictly increasing non-identity function; and B_(avg)(p_(i)) is a function of the brightness values B(p_(j)) of image portions p_(j) in an image region R(p_(i)) containing the portion p_(i).
 19. The manufacture of claim 18 wherein each image portion is a pixel, and the image region R(p_(i)) contains at most 30% of said pixels.
 20. The manufacture of claim 18 wherein B_(avg) is a weighted average of the B values of the image region R(p_(i)), and the sum of the weights is equal to
 1. 21. The manufacture of claim 18 wherein B^(*)(p_(i)) = B_(avg)^(1 − ɛ)(p_(i)) × B^(ɛ)(p_(i)) wherein ε is a positive constant other than 1, and B_(avg) is a weighted average of the brightness values of the image region R(p_(i)).
 22. A manufacture comprising computer-readable digital data representing coordinates of a color S in a first coordinate system, wherein the color S has tristimulus values T₁, T₂, and T₃ in a second coordinate system, wherein the coordinates in the first coordinate system comprise coordinates S₁, S₂, S₃, or are a linear transformation of the coordinates S₁, S₂, S₃, wherein: (A) the coordinate S₁ is defined by a value $B = \sqrt{{g_{11}T_{1}^{2}} + {g_{22}T_{2}^{2}} + {g_{33}T_{3}^{2}} + {g_{12}T_{1}T_{2}} + {g_{13}T_{1}T_{3}} + {g_{23}T_{2}T_{3}}}$ wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ are predefined constants, and g₁₁, g₂₂, g₃₃ are not equal to zero, or (B) the coordinate S₁ is defined by the value B and by a sign of a predefined function of one or more of T₁, T₂, T₃.
 23. A manufacture comprising computer-readable digital data representing coordinates of a color S in a first coordinate system, wherein the color S has tristimulus values T₁, T₂, and T₃ in a second coordinate system, wherein the coordinates in the first coordinate system comprise coordinates S₁, S₂, S₃, or are a linear transformation of the coordinates S₁, S₂, S₃, wherein S₁ is a non-linear function of one or more of T₁, T₂, T₃, wherein multiplication of all of the tristimulus values T₁, T₂ and T₃ by any number in the second coordinate system corresponds to multiplying the coordinate S₁ by the same number in the first coordinate system while leaving S₂ and S₃ unchanged. 